Created
June 24, 2017 21:57
-
-
Save Ambratolm/b03b9c971ad9b8cb90528e07cae63a10 to your computer and use it in GitHub Desktop.
Ecrire un algorithme qui calcul la somme, la soustraction, la multiplication et la division de deux nombres entiers a et b.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
printf("Opérations arithmétiques sur deux nombres entiers:\n"); | |
printf("--------------------------------\n"); | |
int a,b,S,So,M,D; | |
printf("Entrez le premier nombre: "); | |
scanf("%d",&a); | |
printf("Entrez le deuxième nombre: "); | |
scanf("%d",&b); | |
printf("--------------------------------\n"); | |
S=a+b; | |
So=a-b; | |
M=a*b; | |
D=a/b; | |
printf("Somme: %d\nDifférence: %d\nMultipliant: %d\nQuotient: %d\n", S,So,M,D); | |
printf("--------------------------------\n"); | |
system("pause"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment