programs 7.doc
TRANSCRIPT
-
8/10/2019 Programs 7.doc
1/7
Soft. Lab -1 M. Tech. (Part Time) Roll No.-6563
1. Write a program to find the Area of circle
#include#include
#define PI 3.1427Int main (){
clrscr();float r a;cout
+
Output is :
nter the radius of $ircle % 4 rea of the $ircle is % ,-.2 32 units
2. Write a program to find the Average of two numbers.
-
8/10/2019 Programs 7.doc
2/7
Soft. Lab -1 M. Tech. (Part Time) Roll No.-6563
#include#includeInt main ()
{ clrscr();float a / c&-;cout>/;c&(a /) 2;cout
-
8/10/2019 Programs 7.doc
3/7
-
8/10/2019 Programs 7.doc
4/7
Soft. Lab -1 M. Tech. (Part Time) Roll No.-6563
Int main (){
clrscr();int a;cout cin>>a;if(a:2&&-){
cout
#include#includeInt main (){
-
8/10/2019 Programs 7.doc
5/7
Soft. Lab -1 M. Tech. (Part Time) Roll No.-6563
clrscr();int a;coutcout
-
8/10/2019 Programs 7.doc
6/7
Soft. Lab -1 M. Tech. (Part Time) Roll No.-6563
/&n:1-;a&(/'1-) a;cout
-
8/10/2019 Programs 7.doc
7/7