Computer Program C language
1) Sum of two integer Numbers
#include<stdio.h>
int main ( )
{
int a,b,c;
print f ("\n Enter two number");
scan f ("\%d",&a &b);
c=a+b
print f ("\n sum is %d",c);
return 0;
}
2) Write a programme to find out the result after subtraction of two decimal numbers.
#include<stdio.h>
float main ( )
{
float a,b,c;
print f ("\n Enter two number");
scan f ("%f %f", &a &b);
c=a-b;
print f ("\n subtraction is %f",c);
return 0;
}
3) Hello Tech World
#include<stdio.h>
int main ( )
{
print f ("HELLO TECH WORLD");
print f ("\n BYE TECH WORLD ");
return 0:
}
#include<stdio.h>
int main ( )
{
int a,b,c;
print f ("\n Enter two number");
scan f ("\%d",&a &b);
c=a+b
print f ("\n sum is %d",c);
return 0;
}
2) Write a programme to find out the result after subtraction of two decimal numbers.
#include<stdio.h>
float main ( )
{
float a,b,c;
print f ("\n Enter two number");
scan f ("%f %f", &a &b);
c=a-b;
print f ("\n subtraction is %f",c);
return 0;
}
3) Hello Tech World
#include<stdio.h>
int main ( )
{
print f ("HELLO TECH WORLD");
print f ("\n BYE TECH WORLD ");
return 0:
}
No comments