Advertisement
gidmakus

% of a value

Apr 29th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. /*
  2. write a c program that will charge a lian amount by percentage. anything below 4000 you are charged a percentage of 5%, above 4000 is 10% and anything below 1000 no charge.
  3. */
  4. this is the pseudocode:
  5.  
  6. start main method
  7.    
  8.  Accecpt value from user  
  9.   if(value is less than 1000)
  10.     find 100% of 1000;
  11.     print vale of 100% of 1000;
  12.   else if (value is less than 4000)
  13.     find 5% of 4000;
  14.     print value of 5% of 4000;
  15.   else if ( value is  greater than 4000)
  16.     find 10% of 4000;
  17.         print 10% of 4000;
  18.   else
  19.     print a default value
  20.  
  21. close main method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement