C PROGRAMMING
WRITE A PROGRAM TO DISPLAY "WELCOME TO C PROGRAMMING"
#include<stdio.h>
#include<conio.h>
void main( )
{
clrscr( );
Printf("\n Welcome to c programming");
getch( );
}
WRITE A PROGRAM TO SUM OF TWO NO --
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b , sum=0;
clrscr( );
printf("\n Enter any two no");
scanf("\n %d%d",&a, &b);
sum=a+b;
printf("\n sum of two no is %d ",sum);
getch( );
}
WRITE A PROGRAM TO SUBTRACT OF TWO NO --
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b ,sub=0;
clrscr( );
printf("\n enter any two no");
scanf("%d%d", &a,&b);
sub=a-b;
printf("\n sub of two no is %d", sub);
getch( );
WRITE A PROGRAM TO MULTIPLY OF TWO NO--
#include<stdio.h>
#include<conio.h.
void main()
{
int a,b , mul=1;
clrscr( );
printf("\n Enter any two no");
scanf("\n %d%d",&a, &b);
mul=a*b;
printf("\n multiply of two no is %d ", mul);
getch();
}
WRITE A PROGRAM TO DIVIDE TWO NO --
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b , div=1;
clrscr();
printf("\n Enter any two no");
scanf("\n %d%d",&a, &b);
div=a/b;
printf("\n division of two no is %d", div);
getch();
}
2 Comments
Nice 👍... Keep it up
ReplyDeleteGood source for learners
ReplyDeleteIf you have any doubts. please let me know