diogoAlves

IFF/Introdução à Programação/Slide/Pag 15/Ex 3

Feb 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 15 - Exercício 3
  3. #include<stdio.h>
  4. #include<locale.h>
  5.  
  6. int main(){
  7.     setlocale(LC_ALL, "Portuguese");
  8.     float p1, p2;
  9.     printf("Entre com a nota da P1 e a nota da P2 respectivamente: ");
  10.     scanf("%f %f",&p1, &p2);
  11.     printf("Sua média foi: %.1f", (p1+p2)/2);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment