Created
September 16, 2020 08:30
-
-
Save achmadweb/972c2da70c0cb01ae206ad1c8b0c9d79 to your computer and use it in GitHub Desktop.
OPERASI ARITMETIKA
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> | |
int main() | |
{ | |
int x=5; | |
int y=8; | |
printf ("Ini nilai x + y :%d \n", x+y); | |
printf ("Ini nilai x - y : %d \n", x-y); | |
printf ("Ini nilai x * y : %d \n", x*y); | |
printf ("Ini nilai x / y : %d \n", x/y); | |
printf ("Ini nilai y / x : %d \n", y/x); | |
printf ("Ini nilai x mod y : %d \n", x%y); | |
float a=5, b=8; | |
printf ("Ini nilai a / b : %5.2f \n", a/b ); | |
printf ("Ini nilai b / a : %5.2f \n", b/a ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment