Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
discount sum
#include<stdio.h> int main() { int a,b,c,d,e,f,g=0; int i; printf("enter the no f items\n"); scanf("%d",&a); if(a<0) { printf("no bill"); } else { for(i=1;i<=a;i++) { printf("enter the no f units for item %d\n",i); scanf("%d",&b); printf("enter the price for item %d\n",i); scanf("%d",&c); d=b*c; g=g+d; } if(b<0) { printf("cannot generate"); } else if(c<0) { printf("invalid amount"); } else { printf("balance amount Rs.%d\n",g); if(g>=5000) { e=g*0.10; } else if(g<5000 && g>2500) { e=g*0.07; } else { e=g*0.05; } printf("total disount amount Rs.%d\n",e); f=g-e; printf("total amount to b paid is Rs.%d",f); } } }
run
|
edit
|
history
|
help
0
insertionrandom
TVector
kamo discriminant oprava
Herout (67) - 1
TStack_array
makro vzdálenost
Min_Max pole čísel
amal
crackme
stdio.h