TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

PROGRAMA EM C

Casos: PROGRAMA EM C. Pesquise 860.000+ trabalhos acadêmicos

Por:   •  4/10/2013  •  202 Palavras (1 Páginas)  •  180 Visualizações

#include <stdio.h>

#include <stdlib.h>

int main(){

int valorI,notas=0,moedas=0;

float valorF,dec;

printf("Digite o valor\n");

scanf("%f",&valorF);

valorI = (int)(valorF);

dec = valorF-((float)(valorI));

if(valorI >= 50){

notas = valorI/50;

valorI %=50;

printf("%d notas de cinquenta.\n",notas);

}

if(valorI>= 10 && valorI <50){

notas = valorI/10;

valorI%=10;

printf("%d notas de dez.\n",notas);

}

if(valorI < 10){

printf("Nao ha notas disponiveis nesse valor\n");

}

system("PAUSE");

return 0;

}

#include <stdio.h>

#include <stdlib.h>

int main(){

int valorI,notas=0,moedas=0;

float valorF,dec;

printf("Digite o valor\n");

scanf("%f",&valorF);

valorI = (int)(valorF);

dec = valorF-((float)(valorI));

if(valorI >= 50){

notas = valorI/50;

valorI %=50;

printf("%d notas de cinquenta.\n",notas);

}

if(valorI>= 10 && valorI <50){

notas = valorI/10;

valorI%=10;

printf("%d notas de dez.\n",notas);

}

if(valorI < 10){

printf("Nao ha notas disponiveis nesse valor\n");

}

system("PAUSE");

return 0;

}

#include <stdio.h>

#include <stdlib.h>

int main(){

int valorI,notas=0,moedas=0;

float valorF,dec;

...

Disponível apenas no TrabalhosGratuitos.com