1 solutions
-
0
C++ :
#include<iostream> #include<iomanip> using namespace std; int main() {int a=35,b=8; float c; cout<<setw(3)<<a+b<<endl; cout<<setiosflags(ios::fixed); cout.precision(2); c=(a+b)/2.00; cout<<setw(5)<<c<<endl; return 0; }Pascal :
var a,b:integer; begin a:=35; b:=8; writeln(a+b:3); writeln((a+b)/2:5:2); end.
- 1
Information
- ID
- 16809
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By