Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. int main(){
  6. char znak;
  7. int t=0,a=0,o=0;
  8. int tato=0;
  9.  
  10.  
  11. do {
  12. cin>>znak;
  13.  
  14. if (znak=='t')
  15. t++;
  16.  
  17. else if(znak=='a')
  18. a++;
  19.  
  20.  
  21. else if(znak=='o')
  22. o++;
  23.  
  24. if(t>=2 && a>=1 && o>=1 )
  25. tato=t+a+o;
  26.  
  27. }while(tato<4);
  28. cout<<"ze slow mozna ulozyc slowo" ;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement