Escolar Documentos
Profissional Documentos
Cultura Documentos
#include <stdio.h>
int main()
{
int count = 1, soma = 0;
if (count %5 == 0)
soma = soma + count;
}
count++;
}
printf (“A Soma eh: %d”, soma);
}
#include <stdio.h>
main()
{
int count = 99;
while(count >= 0)
{
if(count%2 != 0)
printf("%d ",count);
#include <stdio.h>
main()
{
int total, count = 0;
float nota[4], soma= 0;
inicio:
printf("Numero de alunos na sala: ");
scanf("%d", &total);
if (total > 4)
{
printf ("Numero maior que o permitido");
goto inicio;
}
count++;
}
count = 0;
while(count <= total)
{
soma = soma + nota[count];
count++;
}
#include <stdio.h>
main()
{
int achou = 0, num = 0, count = 0, posicao = 0;
float valores[4];
while(count <= 3)
{
printf("Digite o Valor: ");
scanf("%f", &valores[count]);
count++;
}
count = 0;
while(count <= 3)
{
if (num == valores[count])
{
achou = 1;
posicao = count;
}
count++;
}
if (achou == 1)
printf("O Numero esta na posicao: %d", posicao);
else
printf("Valor nao encontrado");
}
while(count <= 5)
{
printf("Digite o Caracter na posicao %d: ", count + 1);
scanf("%s", &informacao[count]);
count++;
}
count = 0;
while(count <= 5)
{
printf("%c", informacao[count]);
if (informacao[count] == 'a' || informacao[count] == 'i')
val++;
count++;
}