Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdbool.h>
- #include<stdio.h>
- #include<stdlib.h>
- void f1()
- {
- char c;
- scanf ("%c", &c);
- int dif='a'-'A';
- if (c>='A'&&c<='Z')
- c+=dif;
- printf( "%c",c);
- }
- void f2()
- {
- int a,b;
- char Q;
- scanf ("%d %c %d",&a,&Q,&b);
- switch (Q)
- {
- case '*':printf ("%d",a*b);break;
- case '/':printf ("%d",a/b);break;
- case '+':printf ("%d",a+b);break;
- case '-':printf ("%d",a-b);break;
- case '%':printf("%d",a%b);break;
- default : printf (" \n");
- }
- }
- typedef struct
- {
- int nrleg;
- char nume;
- float nota_mate;
- float nota_info;
- float medie;
- float nota_bac;
- bool admis;
- bool buget;
- }candidat;
- void citire(candidat a)
- {
- scanf ("%d",&a.nrleg);
- scanf ("%c",&a.nume);
- scanf ("%f",&a.nota_mate);
- scanf ("%d",&a.nota_info);
- scanf ("%d",&a.nota_bac);
- scanf ("%d",&a.nrleg);
- a.medie=(a.nota_info+a.nota_mate)/2;
- }
- void qsort(void *size_t, int
- void medie()
- {
- scanf ("%f %f %f",&a.nota_mate,&a.nota_info,&a.nota_bac);
- float medie=(a.nota_info+a.nota_mate)/2;
- a.medie=medie*80/100 + a.nota_bac*20/100;
- printf ("%f",a.medie);
- }
- int main()
- {
- medie();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement