Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. // Kevin Mora
  2. // Project 4- Ninjatactics
  3. // COP 3223c-16 2-12-16
  4.  
  5. #include <stdio.h>
  6.  
  7.  
  8. int numshop;
  9. int i;
  10. int ing;
  11. int x;
  12. int j;
  13. float price;
  14.  
  15. int main (){
  16.  
  17. printf("How many shops will you be visiting?\n");
  18. scanf("%d\n", &numshop);
  19.  
  20. for (i=1; i<=numshop; i++){
  21.    
  22.     printf("You are now in Shop #%d \n", i );
  23.    
  24.     printf("How many ingredients do you need in shop #%d?\n", i);
  25.     scanf("%d", &ing);
  26.    
  27.         for (j=1; j<=ing; j++){
  28.            
  29.             printf("How much is ingredient #%d?\n", j);
  30.             scanf("%.2f", price);
  31.         }
  32. }
  33.    
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement