fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int p;
  7. long long unsigned int n,k,m;
  8. cin>>p;
  9. for(int i=0;i<p;i++)
  10. {
  11. cin>>n>>k>>m;
  12. int count = 0
  13. if (n==k)
  14. {
  15. cout<<count;
  16. }
  17. else
  18. {
  19. while(n<=m)
  20. {
  21. n=n*k;
  22. count++;
  23. }
  24. cout<<count;
  25. }
  26. }
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2
2 2 7
2 2 8
compilation info
prog.cpp: In function 'int main()':
prog.cpp:13:3: error: expected ',' or ';' before 'if'
   if (n==k)
   ^
prog.cpp:17:3: error: 'else' without a previous 'if'
   else
   ^
stdout
Standard output is empty