Você está na página 1de 2

// 1o exerccio #include <stdio.h> #include <stdlib.

h> main () { int num; printf("\n INFORME NUMERO "); scanf("%d",&num); if (num >100){ printf("\nNUmero %d eh maior que 100\n\n",num); } getchar();getchar(); //system("pause"); } // 2o exerccio #include <stdio.h> #include <stdlib.h> main () { int idade; printf("\n INFORME SUA IDADE "); scanf("%d",&idade); if (idade >= 18){ printf("\nVOC J TEM MAIORIDADE\n\n"); printf("\n\tPROGRAMA FINALIZADO "); } getchar();getchar(); //system("pause"); } // 3o exerccio #include <stdio.h> #include <stdlib.h> main () { int num; printf("\n INFORME NUMERO "); scanf("%d",&num); if (num >100){ printf("\nNumero %d eh maior que 100\n\n",num); } else { printf("\nNumero %d eh menor ou igual 100\n\n",num); } getchar();getchar(); //system("pause"); } // 4o exerccio #include <stdio.h> #include <stdlib.h> main () { int idade; printf("\n INFORME SUA IDADE "); scanf("%d",&idade); if (idade >= 18){ printf("\nVOC J TEM MAIORIDADE\n\n"); } else { printf("\nVOC EH MENOR\n\n"); }

getchar();getchar(); //system("pause"); } // 5o exerccio #include <stdio.h> #include <stdlib.h> main () { float vl_compras, bonus; printf("\n INFORME o valor das compras "); scanf("%f",&vl_compras); if (vl_compras > 500){ bonus = vl_compras *0.1; } else { bonus = vl_compras *0.05; } printf("\n\tBONUS CONCEDIDO = R$ %.2f",bonus); getchar();getchar(); //system("pause"); } // 6o exerccio #include <stdio.h> #include <stdlib.h> main () { float n1,n2,med; printf("\n INFORME PRIMEIRA NOTA "); scanf("%f",&n1); printf("\n INFORME SEGUNDA NOTA "); scanf("%f",&n2); med=(n1+n2)/2; if (med>=7) { printf("\nAPROVADO COM MEDIA %.1f\n\n",med); } else { printf("\nEM ANALISE SUA MEDIA %.1f\n\n",med); } getchar();getchar(); //system("pause"); }

Você também pode gostar