Programming in C
Programming in C
Submitted by: -
Jitender Singh Negi
1. BG Background
2. B Bold
3. I Italic
4. U Underline
5. H1 Head line
6. Li Dotes
7. DD Paragraph
8. Br Break
9. Hr heading Row
10. <i> </i> For Spacing
11. <b> </b> Cell spacing
12 Tr
13. Td Table Data
14. Th Table heading
15. Src Source
Note:- you type all the word in small letter. When you make the program in C
Language.
#include<stdio.h>
#include<conio.h> Out Put
Void main ( )
C = 10
{
Int a,b,c;
Clrscr( );
a = 30;
b = 3;
c=a/b;
Print f (“div=%d”,c);
Getch ( );
}
#include<stdio.h>
#include<conio.h> Out Put
Void main ( ) 8
{ Positive Number
Int a; -4
Clrscr ( ); Negative Number
Printf (”enter a number”);
Scanf(“%d”,&a);
If (a>=0)
{
Print f (“Positive Number);
}
Else
{
Print f (“ negative number);
}
Getch ( );
}
This program for find out the “Even Number and Odd Put
Out Number”
#include<stdio.h> 2
#include<conio.h> Is even number
5
Is odd number
Void main ( )
{
Int a;
Clrscr ( );
Printf (”enter a number”);
Scanf(“%d”,&a);
If (a%2= =0)
{
Print f (“a is even number);
}
Else
{
Print f (“ a is odd number);
}
Getch ( );
}
This program for find out the Discriminate = b2-4ac
#include<stdio.h>
#include<conio.h> Out Put
Void main ( ) A=10
{ B=5
C=2
Int a,b,c;
D = b2-4ac
Clrscr ( ); = (5)2-4x10x2
Printf (”enter the value=”); = 25-80
Scanf(“%d”,&a); = -55
Printf (”enter the value=”);
Scanf(“%d”,&b);
Printf (”enter the value=”);
Scanf(“%d”,&c);
D=bxb-4xaxc
Printf(“%d”,d);
Getch ( );
}
This program for find out the “Area” Out Put
#include<stdio.h> formula is πr2
R=5
= 3.14x5x5
= 3.14x25
= 78.5
#include<conio.h>
Void main ( )
{
Float p,r,z;
Clrscr ( );
P=3.14;
Printf (”enter the radius= ”);
Scanf(“%f”,&r);
A=pxrxr;
Print f (“area=%f”,a);
Getch ( );
}
This program for find out the “Length”
#include<stdio.h>
#include<conio.h> Out Put
Void main ( ) A=10
{ B=5
C=2
Int a,b,c;
D = b2-4ac
Clrscr ( ); = (5)2-4x10x2
Printf (”enter the value=”); = 25-80
Scanf(“%d”,&a); = -55
Printf (”enter the value=”);
Scanf(“%d”,&b);
Printf (”enter the value=”);
Scanf(“%d”,&c);
D=bxb-4xaxc
Printf(“%d”,d);
Getch ( );
}