Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  123456
Language: C/C++
Code:
#include<iostream>
#include<cmath>
#include<stdlib.h>
#include<cstring>
#include<iomanip>
using namespace std;
int main()
{
     int a;
     int s;
     cin >> a;
     if(a>10000){
          s=a*5/100;
     }
     else if(a<=10000&&a>=5000){
          s=a*3/100;
     }
     else if(a<5000&&a>=1000){
          s=a*2/100;
     }
     else if(a>1000){
          s=0;
     }
     int aa=round(s);
     cout << aa;
     return 0;
}
Comments: