Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Kevin Mora
- // Project 4- Ninjatactics
- // COP 3223c-16 2-12-16
- #include <stdio.h>
- int numshop;
- int i;
- int ing;
- int x;
- int j;
- float price;
- int main (){
- printf("How many shops will you be visiting?\n");
- scanf("%d\n", &numshop);
- for (i=1; i<=numshop; i++){
- printf("You are now in Shop #%d \n", i );
- printf("How many ingredients do you need in shop #%d?\n", i);
- scanf("%d", &ing);
- for (j=1; j<=ing; j++){
- printf("How much is ingredient #%d?\n", j);
- scanf("%.2f", price);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement