codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <stdio.h> main (void) { int dis,q; float p, tot; printf ("enter the quantity(Q) and price (P)\n"); scanf ("%d%f",&q,&p); if (q>1000) { dis = 10; tot = (p*q)-(p*q*10/100); } else tot = p*q; printf ("total expenses = Rs %c\n"); return 0; }
Private
[
?
]
Run code
Submit