Securing Knowledge.
Continuosity on learning is the most important thing to secure your knowledge.
Monday, September 13, 2004
Code for print and scan for user input
Well, enough for helloworld stuff, go for the next learn-back code... hehe :p. It's for how to print and scan for user input.
#include stdio.h /* i cannot put the <> symbol arounf stdio.h (it's illegal in this blog, hehe... :p)*/
int main ()
{
int num1, num2, jumlah;
printf ("Masukkan nombor pertama\n");
scanf ("%d", &num1);
printf ("Masukkan nombor kedua\n");
scanf ("%d", &num2);
jumlah = num1 + num2;
printf ("Jumlah dua nombor tadi ialah %d \n", jumlah);
return 0;
}
continue... :)
#include stdio.h /* i cannot put the <> symbol arounf stdio.h (it's illegal in this blog, hehe... :p)*/
int main ()
{
int num1, num2, jumlah;
printf ("Masukkan nombor pertama\n");
scanf ("%d", &num1);
printf ("Masukkan nombor kedua\n");
scanf ("%d", &num2);
jumlah = num1 + num2;
printf ("Jumlah dua nombor tadi ialah %d \n", jumlah);
return 0;
}
continue... :)
carrotsusu, 10:00 PM