Example #1: C Output
#include <stdio.h> //This is needed to run printf() function.
int main()
{
printf("My name is Suveera"); //displays the content inside quotation
return 0;
}
Example #2: C Integer Output
#include <stdio.h>
int main()
{
int a = 5;
printf("Number = %d", a);
return 0;
}
Example #3: C Integer Input/Output
#include <stdio.h>
int main()
{
int a;
printf("Enter an integer: ");
scanf("%d",&a);
printf("Number = %d",a);
return 0;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น