- Simple C Program Hello World
- Get Two Numbers From User And Check Them Same Or Not Same
- Get To Num From User And Do 1]Add 2]Sub 3]Mult 4]Div
- Get 3 Subject Marks From User And Show Result
- Get Radius From User And Show Area Of Circle
- Get Base And Height From User And Show Area Of Traingle
- Get Age from User And Show Them Can Make Pan Card Or NoT
- Get Number from User And Show Them Even Or Odd
- Get Charector From User And Show Them Vowel Or Not
- Get 3 Number From User And Show Them Which Is Greater
- Get Charector From User And Show Them Vowel Or Not By Using Switch
- Get Number From User And Show Them In Reverce Order
- Get Number From User And Fiend Factorial Of Them
- Get Number From User And Fiend Odd Numbers Up To User Number And Show Addition Of Odd Numbers
- Get Number From User And Fiend Number Armstrong Or Not
- Get Number From User And Show Them Table Of This Number
- Get Number From User And Show Them Number Perfect Or Not
- Make Any C Program Useing Do While
- Get Number From User And Make Number Pattern
- Get Number From User And Make Charector Pattern
- Get 10 Numbers From User And Store In Array Or Display Them
- Get 10 Numbers From User And Store In Array And Display How Many Odd Numbers
- Bonus Program
Example
#include<stdio.h> #include<conio.h>
Output
Enter second num :43
Your numbers are same
Example
#include<stdio.h> #include<conio.h>
Output
Enter second num :45
The Add is=75
The Sub is=-15
The Mult is=1350
The Divi is=0
Example
#include<stdio.h> #include<conio.h>
Output
Enter second subject marks:30
Enter therd subject marks:26
Your result is=33.000000
Example
#include<stdio.h> #include<conio.h>
Output
Area of circle is=3215.360107
Example
#include<stdio.h> #include<conio.h>
Output
Enter the height :12
Area of traingal is=270.000000
Example
#include<stdio.h> #include<conio.h>
Output
Sorry you can't make pan card, thank you
Example
#include<stdio.h> #include<conio.h>
Output
The num is odd
Example
#include<stdio.h> #include<conio.h>
Output
u is vowel, thank you
Example
#include<stdio.h> #include<conio.h>
Output
Enter 2nd number :12
Enter 3rd number :12
45 is greater number, thank you
Example
#include<stdio.h> #include<conio.h>
Output
u is vowel
Example
#include<stdio.h> #include<conio.h>
Output
Reverce no. is=681
Example
#include<stdio.h> #include<conio.h>
Output
Factorial of 5=120
Example
#include<stdio.h> #include<conio.h>
Output
1
3
5
7
9
11
13
15
17
The addition of odd numbers is = 81
Example
#include<stdio.h> #include<conio.h>
Output
number is armstrong
Example
#include<stdio.h> #include<conio.h>
Output
8
16
24
32
40
48
56
64
72
80
Example
#include<stdio.h> #include<conio.h> int main() { int no,sum,i; printf("Enter the number : "); scanf("%d",&no); i=1; sum=0; while(i<no) { if (no%i==0) { sum=sum+i; } i++; } if(sum==no) { printf("number is perfect"); } else { printf("number is not perfect"); } getch(); }
Output
number is perfect
Example
#include<stdio.h> #include<conio.h>
Output
Hiiiii
Hiiiii
Hiiiii
Hiiiii
Hiiiii
Hiiiii
Example
#include<stdio.h> #include<conio.h> void main() { int n,i,j,sum=0; printf("\n Enter the number : "); scanf("%d",&n); for(i=n;i>0;i--) { for(j=0;j<i;j++) { sum++; printf("%d \t",sum); } printf("\n"); } getch(); }
Output
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26
27 28 29 30
31 32 33
34 35
36
Example
#include<stdio.h> #include<conio.h> void main() { int i,j,n; char ch1,ch2; printf("\n Enter no of line : "); scanf("%d",&n); for(i=0;i<n;i++) { ch1='A',ch2='a'; for(j=0;j<=i;j++) { printf("%c%c \t",ch1,ch2); ch1++; ch2++; } printf("\n"); } getch(); }
Output
Enter no of line : 8
Aa
Aa Bb
Aa Bb Cc
Aa Bb Cc Dd
Aa Bb Cc Dd Ee
Aa Bb Cc Dd Ee Ff
Aa Bb Cc Dd Ee Ff Gg
Aa Bb Cc Dd Ee Ff Gg Hh
Example
#include<stdio.h> #include<conio.h>
Output
Enter the number : 5
Enter the number : 6
Enter the number : 7
Enter the number : 2
Enter the number : 3
Enter the number : 1
Enter the number : 9
Enter the number : 2
Enter the number : 7
The values are = 4
The values are = 5
The values are = 6
The values are = 7
The values are = 2
The values are = 3
The values are = 1
The values are = 9
The values are = 2
The values are = 7
Example
#include<stdio.h> #include<conio.h> void main() { int a[10],i,cnt=0; printf("Enter the number : \n"); for(i=0;i<10;i++) { scanf("%d",&a[i]); } for(i=0;i<10;i++) { if(a[i]%2!=0) { printf("%d",a[i]); cnt++; } } printf("total odd numbers are = %d",cnt); getch(); }
Output
4
2
6
8
12
14
16
18
3
9
39total odd numbers are = 2
Example
#include<stdio.h> #include<conio.h>
Output
Enter the 2nd number:15
Please type a number of following condition , thank you
1:+
2:-
3:*
4:/
3
you choice multiplication which is=120.000000