List of programs
Eto yung mga listahan na maari naten magawa sa C language programming for whole semester
Hello world
Print Integer
Addition
Odd or Even
Add, subtract, multiply and divide
Check vowel
Leap year
Add digits
Factorial
HCF and LCM
Decimal to binary conversion
ncR and nPr
Add n numbers
Swapping
Reverse number
Palindrome number
Print Pattern
Diamond
Prime numbers
Find armstrong number
Generate armstrong number
1. Hello world
It Prints Hello World Using Printf
#include <stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
2. Print Integer
this program is for input using scanf and printf for display this particular program helps the student to understand input and output in C language.
#include <stdio.h>
int main()
{
int a;
printf("Enter an integer\n");
scanf("%d", &a);
printf("Integer that you have entered is %d\n", a);
Getchar();
Getchar();
}
3. Addition
This program performs basic arithmetic mathematical operation using input and output
#include<stdio.h>
int main()
{
int a, b, c;
printf("Enter 1st numbers to add\n");
scanf("%d",&a);
printf("Enter two numbers to add\n"); scanf("%d",&b);
c = a + b;
printf("Sum of entered numbers = %d\n",c);
return 0;
}
3-15 Coming soon
#include
TumugonBurahinint main()
{
int n, reverse = 0;
printf("Enter a number to reverse\n");
scanf("%d",&n);
while (n != 0)
{
reverse = reverse * 10;
reverse = reverse + n%10;
n = n/10;
}
printf("Reverse of entered number is = %d\n", reverse);
getchar();
getchar();
}