fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. string napis="alaMakota";
  7. char z = 'M';
  8. int i=0;
  9. while (napis[i]!=z)
  10. {
  11. i++;
  12. }
  13. cout<<i<<endl;
  14.  
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
3