fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string a = "";
  8. cin >> a;
  9. bool flag = true;
  10. int ln =
  11.  
  12. for(int i = 0;i<lenght(a);i++)
  13. {
  14. if(a[i] != 'a' && a[i] != 'A')
  15. {
  16. flag = false;
  17. break;
  18. }
  19. }
  20.  
  21. if(flag)
  22. {
  23. cout << "Asya";
  24. }
  25. else
  26. {
  27. cout << "Vasya";
  28. }
  29. }
  30.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:5: error: expected primary-expression before ‘for’
     for(int i = 0;i<lenght(a);i++)
     ^~~
prog.cpp:12:19: error: ‘i’ was not declared in this scope
     for(int i = 0;i<lenght(a);i++)
                   ^
prog.cpp:12:29: error: ‘lenght’ was not declared in this scope
     for(int i = 0;i<lenght(a);i++)
                             ^
stdout
Standard output is empty