Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <iomanip>
  4. #include <conio.h>
  5.  
  6. using namespace std;
  7.  
  8. string wyraz1,wyraz2;
  9.  
  10. int main()
  11. {
  12. cout<<"Wprowadz pierwszy wyraz: "<<endl;
  13. cin>>wyraz1;
  14. cout<<"Wprowadz drugi wyraz: "<<endl;
  15. cin>>wyraz2;
  16. if(wyraz1[wyraz1.length()]>wyraz2[wyraz2.length()])
  17. {
  18. cout<<"Wyraz " << wyraz1 <<" jest dluzszy";
  19. }
  20. else
  21. {
  22. cout<<"Wyraz " << wyraz2 <<" jest dluzszy";
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement