#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int x=1;
float b, c, d, e;
char a[15], ver;
do
{
printf("\n\nNome do Pao %i (Ate 15 caract.):",x);
scanf(" %s",&a);
printf("\n\nPreco do Pao %i:",x);
scanf("%f",&b);
printf("\n\nNome do Pao %i:\n%s\n", x, a);
printf("\nPreco do Pao %i:\n%f\n\n\n", x, b);
d+=b;
printf("Proximo Pao? (S ou N):\n");
scanf(" %c",&ver);
if(ver == 'S')
{
x++;
}
else if(ver == 'N')
{
printf("\n\n\n\n\nTotal:\n%f", d);
}
}
while(ver == 'S' && x <= 50);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: