SHARE
TWEET

Untitled

a guest Nov 19th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top