diogoAlves

IFF/Introdução à Programação/Slide/Pag 32/Ex 1

Feb 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 32 - Exercício 1
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<locale.h>
  6.  
  7. int main(){
  8.     setlocale(LC_ALL,"Portuguese");
  9.     char escolha[3];
  10.     float nota1, nota2;
  11.     do{
  12.         printf("Entre com as duas notas: ");
  13.         scanf("%f %f",&nota1,&nota2);
  14.         printf("Sua média foi %.1f.", (nota1+nota2)/2);
  15.         printf("\nDeseja Realizar nova consulta? ");
  16.         scanf(" %s",&escolha);
  17.     }while (stricmp (escolha, "Sim") == 0);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment