Advertisement
MatveyL

qwe

Oct 24th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <fstream>
  4. #include <math.h>
  5. using namespace std;
  6.  
  7. int main(){
  8. int a,b,c,g = 0,i=0;
  9. cin>>a;
  10.  
  11.  
  12. while(g ==0){
  13. if ((a-i*3)<0){
  14. cout<<0<<endl;
  15. cout<<0;
  16. return 0;
  17. }
  18. else{
  19. if((a-i*3) % 4 == 0 ){
  20.  
  21. cout<<i<<endl;
  22. if((a-(i*3))/4 >= 0){
  23. cout<<(a-(i*3))/4<<endl;
  24. }
  25. else{
  26. cout<<0;
  27. }
  28. return 0;
  29. }
  30. }
  31. i+=1;
  32.  
  33.  
  34.  
  35.  
  36. }
  37.  
  38. return 0 ;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement