-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe6.c
More file actions
36 lines (33 loc) · 796 Bytes
/
e6.c
File metadata and controls
36 lines (33 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
Algorithme qui lit deux notes et leur coeffients et affiche leur moyenne
variable a,ca,b,cb,m:entier
dedut
ecrire("Entrer une note:");
lire(a);
ecrire("Entrer son coeffient:");
lire(ca);
ecrire("Entrer une autre note:");
lire(b);
ecrire("Entrer son coeffient:");
lire(cb);
m<-((a*ca)+(b*cb))/(ca+cb)
afficher("La moyenne de ces deux notes est",m);
fin
*/
//programme C
#include<stdio.h>
int main()
{
int a,ca,b,cb,m;
printf("Entrer une note:");
scanf("%d",&a);
printf("Entrer son coeffient:");
scanf("%d",&ca);
printf("Entrer une autre note:");
scanf("%d",&b);
printf("Entrer son coeffient:");
scanf("%d",&cb);
m=((a*ca)+(b*cb))/(ca+cb);
printf("La moyenne de ces deux notes est %d",m);
return (0);
}