Sumita Arora Class --XI C++ Answer Programme
Programme 1
Source Code:
//this is question 19 page 208
#include<iostream.h>
#include<conio.h>
void main()
{ float height;
clrscr();
cout<<"Enter your height in centimetres :";
cin>>height;
cout<<"\nYour height in inches :";
cout<<height/2.54;
cout<<"\nYour height in feet :";
cout<<(height/2.54)/12;
getch();
}
Programme 2
Source Code:
//question 21 page 208
#include<iostream.h>
#include<conio.h>
void main()
{ float n;
clrscr();
cout<<"Enter the value :";
cin>>n;
cout<<"\nn^2 :";
cout<<n*n;
cout<<"\nn^3 :";
cout<<n*n*n;
cout<<"\nn^4 :";
cout<<n*n*n*n;
cout<<"\nn^5 :";
cout<<n*n*n*n*n;
getch();
}
Programme 3
source code
2 comments:
These codes are 100% correct
you rockk bro...
Post a Comment