Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1)
- int a = 13/5;
- int b = 13%5;
- int c = 13.0/5;
- double d = 13/5;
- double e = 13%5;
- double f = 13.0/5;
- double g = 13/5 + 2/5;
- double h = 13.0/5 + 2.0/5;
- int i = 13.0/5 + 2.0/5;
- cout<<a<<endl;//деление целого числа 2
- cout<<b<<endl;//остаток от числа 3
- cout<<b<<endl;//деление числе с точкой 3
- cout<<d<<endl;//деление дробного числа 2
- cout<<e<<endl;//остаток дробного числа 3
- cout<<f<<endl;//деление дробного числа с точкой 2.6
- cout<<g<<endl;//деление дробного числа 2+0=2
- cout<<h<<endl;//деление дробных чисел с точкой 3+0=3
- cout<<i;//деление целых чисел с точкой 3+0=3
- }
- 2)
- //2
- int x;
- x=x*x;
- x=x*x;
- 3)
- x=x*x;
- x=x*x*x;
- 4)
- int x,a,b;
- b=x*x;
- a=b*b*b;
- x=a*x;
- 5)
- int x;
- x=x*x;
- x=x*x;
- x=x*x;
- 6)
- int x,a,b,c;
- a=x*x;
- b=a*a*a;
- c=b*b;
- x=c*x;
- 7)
- int x,a,b,c;
- a=x*x*x;
- b=a*a*a;
- c=b*b;
- x=c*a;
- 8)
- string x;
- cin>>x;
- cout<<x[x.size()-1];
- 9)
- int x;
- cin>>x;
- x=x/10;
- cout<<x;
- 10)
- string x;
- cin>>x;
- cout<<x[x.size()-2];
- 11)
- int x;
- cin>>x;
- cout<<x/100+x/10%10+x%10;
- 12)
- int h,m,x;
- cin>>h>>m;
- x=360/12*h+360/60*m/24;
- cout<<x;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement