Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int num;
  5. int count;
  6. int test = 0;
  7.  
  8. int main()
  9. {
  10. cin>> num;
  11. for (int count = 0; count < num; count++)
  12. if (count % 4 == 0)
  13. (test++);
  14. else
  15. cout<<"";
  16.  
  17. return 0;
  18. }
  19.  
  20. cout << test;
  21. getch(); // use this so the console won't close automatically
  22. return 0;
  23.  
  24. int main()
  25. {
  26. cin>> num;
  27. cout << num/4;
  28. getch(); // use this so the console won't close automatically
  29. return 0;
  30. }
  31.  
  32. #include<iostream>
  33. using namespace std;
  34.  
  35. int main()
  36. {
  37. int num;
  38. cin>> num;
  39. cout<< num<<" is divisible by 4 "<< (num>>2) <<" time"<<(num>>2>1?"s":"") <<endl;
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement