View Code of Problem 70

#include<stdio.h>
main(){
	int profit,bouns;
	scanf("%d",&profit); 
	if(profit<100000)
	 bouns=0.1*profit;
	 else if(profit>100000&&profit<200000)
	 bouns=(profit-100000)*0.075+10000;
	 else if(profit>200000&&profit<400000)
	 bouns=(profit-200000)*0.05+7500+10000;
	 else if(profit>400000&&profit<600000)
	 bouns=(profit-400000)*0.03+5000+7500+10000;
	 printf("%d",bouns);


} 

Double click to view unformatted code.


Back to problem 70