Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rombyar
Created July 28, 2019 23:35
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 rombyar/c74c5b0ee5105f263a11eb0f457407b0 to your computer and use it in GitHub Desktop.
Save rombyar/c74c5b0ee5105f263a11eb0f457407b0 to your computer and use it in GitHub Desktop.
main()
{
int a, b;
float hasil;
printf("\n\tSilakan masukkan bilangan pertama: ");
scanf("%d", &a);
printf("\tSilakan masukkan bilangan kedua: ");scanf("%d",&b);
printf("\n\tHasilnya ... \n");
printf("\t%d + %d = %d \n", a, b, a+b);sleep(100);
printf("\t%d - %d = %d \n", a, b, a-b);sleep(100);
printf("\t%d * %d = %d \n", a, b, a*b);sleep(100);
printf("\t%d / %d = %.3f \n", a, b, (float) a/b);sleep(100);
printf("\t%d mod %d = %d\n", a, b, (int) a%b);sleep(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment