Skip to content

Instantly share code, notes, and snippets.

@achmadweb
Created September 16, 2020 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achmadweb/972c2da70c0cb01ae206ad1c8b0c9d79 to your computer and use it in GitHub Desktop.
Save achmadweb/972c2da70c0cb01ae206ad1c8b0c9d79 to your computer and use it in GitHub Desktop.
OPERASI ARITMETIKA
#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