1 solutions
-
0
C++ :
//hhh #include <iostream> using namespace std; int main(){ int a,p; cin>>a; if(a<=100){ p=2*a; cout<<p; } if(a>100){ p=200+1*(a-100); cout<<p; } return 0; }Pascal :
program ex_1; var a:integer; begin readln(a); if a<=100 then writeln(2*a); if a>100 then writeln(200+(a-100)*1); end.
- 1
Information
- ID
- 17162
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By