Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Last active October 20, 2018 10:34
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 IhwanID/883eecc89bec3fd7e83d5b63c40c3c77 to your computer and use it in GitHub Desktop.
Save IhwanID/883eecc89bec3fd7e83d5b63c40c3c77 to your computer and use it in GitHub Desktop.
Latihan menggunakan Bahasa C di Kampus STMIK Sumedang
#include <stdio.h>
int main(void){
printf("Welcome to C!\n");
int angka1;
int angka2;
int jumlah;
int hasilKali;
printf("masukan angka pertama\n");
scanf("%d", &angka1);
printf("masukan angka kedua\n");
scanf("%d", &angka2);
jumlah = angka1 + angka2;
hasilKali = angka1 * angka2;
printf("jumlah ny adalah : %d \n", jumlah);
printf("Hasil perkalian adalah : %d \n", hasilKali);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment