#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 Produto %i (Ate 15 caract.):",x);
	scanf(" %s",&a);
	printf("\n\nPreco do Produto %i:",x);
	scanf("%f",&b);
	
	printf("\n\nNome: Produto%i:\n%s\n", x, a);
	printf("\nPreco: Produto%i:\n%.2f\n\n\n", x, b);
	
	d+=b;
	
	printf("Proximo Produto? (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);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: