Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. 1. Zad
  2. #include<iostream>
  3. using namespace std;
  4.  
  5. int main(){
  6. int i;
  7.  
  8. cout<<" ";
  9. cin>>i;
  10.  
  11. if(i>1){
  12. cout<<"10";
  13. }
  14. else
  15. 1==1*8;
  16.  
  17. return 0;
  18. }
  19. ---------------------------------------------
  20. 2. Zad
  21. #include<iostream>
  22. using namespace std;
  23.  
  24. int main(){
  25. int a;
  26. int b;
  27. int y;
  28.  
  29. cout<<" ";
  30. cin>>a;
  31. cout<<" ";
  32. cin>>b;
  33.  
  34. if(b==0){
  35. cout<<" ";
  36. }
  37. else{
  38. y=a/b;
  39. cout<<y;
  40. }
  41.  
  42. return 0;
  43. }
  44.  
  45. ---------------------------------------------------
  46. 3. Zad
  47. #include<iostream>
  48. using namespace std;
  49.  
  50. int main(){
  51. float d1;
  52. cout<<" "<<endl<<" "<<endl;
  53. cout<<" ";
  54. cin>>d1;
  55. cout<<" "<<d1*2.54;
  56.  
  57. return 0;
  58. }
  59. --------------------------------------------
  60. 4. Zad
  61. #include<iostream>
  62. using namespace std;
  63.  
  64. int main(){
  65. float d1;
  66. cout<<" "<<endl;
  67. cout<<" ";
  68. cin>>d1;
  69. cout<<" "<<d1*3.89;
  70.  
  71. return 0;
  72. }
  73. ---------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement