Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. int main(){
  3. char nume[20];
  4. char adresaEmail[30];
  5. int nota1;
  6. int nota2;
  7. int nota3;
  8. float medie;
  9.  
  10.  
  11. printf("Introdu numele, adresa de email si cele trei note:\n");
  12. scanf("%s%s%d%d%d", nume, adresaEmail, &nota1, &nota2, &nota3);
  13.  
  14. medie = (float)(nota1 + nota2 + nota3) / 3;
  15.  
  16.  
  17. printf("Studentul cu emailul: %s are media: %10.2f!\n", adresaEmail, medie);
  18. printf("Numele este: %s\n", nume);
  19.  
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement