sparrow02

3

Dec 8th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include<string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string imie;
  8. cin>>imie;
  9. int dlugosc_imienia=imie.length();
  10. cout<<"dlugosc "<<dlugosc_imienia<<endl;
  11. if(imie[dlugosc_imienia-1]=='a'){
  12. cout<<"dziewczynka"<<endl;
  13. }
  14. else{
  15. cout<<"chlopiec"<<endl;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment