Mise à jour de mes travaux
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
print
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int x=3;
|
||||
|
||||
if (x=2) {
|
||||
printf("x vaut 2\n");
|
||||
} else {
|
||||
printf("x est different de 2\n");
|
||||
}
|
||||
|
||||
printf("%d\n", x);
|
||||
|
||||
if (x=0) {
|
||||
printf("x vaut 0\n");
|
||||
} else {
|
||||
printf("x est different de 0\n");
|
||||
}
|
||||
|
||||
printf("%d\n", x);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* il faut le double symbole égal dans les deux if */
|
||||
@@ -0,0 +1,2 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int a;
|
||||
int b;
|
||||
|
||||
printf("entrez un premier réel :");
|
||||
scanf("%d", &a);
|
||||
printf("entrez un second réel:");
|
||||
scanf("%d", &b);
|
||||
|
||||
int multiplication = a * b
|
||||
|
||||
if (multiplication < 0)
|
||||
printf("le signe de la multiplication est négatif");
|
||||
else
|
||||
printf("le signe de la multiplication est positif");
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int n ;
|
||||
|
||||
printf("entrez un entier naturel :");
|
||||
scanf(%d, &n);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return EXIT_SUCCESS
|
||||
Reference in New Issue
Block a user