1 solutions
-
0
C++ :
#include <iostream> #include <cstdio> using namespace std; int main() { double w,p; cin>>w; if(w<=10){ p=w*2.5; } else{ p=(w-10)*4+25; } printf("%0.1f\n",p); return 0; }Pascal :
var m,n:real; begin read(n); if n>10 then m:=10*2.5+(n-10)*4 else m:=n*2.5; write(m:0:1); end.
- 1
Information
- ID
- 17163
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By