Question#1:-Write A Program To Input Your Name, Address and Age To Print It On Screen

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

R.

N:-12-ME-36 NAME:-ABDUL WAHAB TARIQ

Question#1:-write a program to input your name,address and


age to print it on screen.

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
char a,b,c;
cout<<"Name :Abdul Wahab Tariq"<<a<<endl;
cout<<"Adress :House 24 Block C Zaib Colony
Gujrat"<<b<<endl;
cout<<"Age :19 years old"<<c<<endl;
getch();
}
R.N:-12-ME-36 NAME:-ABDUL WAHAB TARIQ

Question#2:-write a program to input your age in year and


covert it in months,days,hours,minutes and seconds

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
long int year,month,day,hour,minute,second;
cout<<"enter age in years=";
cin>>year;
month=12*year;
day=30*month;
hour=24*day;
minute=60*hour;
second=60*minute;
cout<<"age in month="<<month<<endl;
cout<<"age in day="<<day<<endl;
cout<<"age in hour="<<hour<<endl;
cout<<"age in minute="<<minute<<endl;
cout<<"age in second="<<second<<endl;
getch();
}
R.N:-12-ME-36 NAME:-ABDUL WAHAB TARIQ
R.N:-12-ME-36 NAME:-ABDUL WAHAB TARIQ

Question#3write a program to convert the temperature


Fahrenheit in celcuis

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
float f,c;
cout<<"temprature in fahrenheit=";
cin>>f;
c=5*(f-32)/9;
cout<<"tenprature in celcius="<<c;
getch();
}
R.N:-12-ME-36 NAME:-ABDUL WAHAB TARIQ

Question#4write a program to iput an amount in rupees and


convert it into dollars

#include<iostream.h>
#include<conio.h>
void main()
{
float r,d;
cout<<"enter amount in rupees=";
cin>>r;
d=r/99;
cout<<"amount in dollars="<<d<<endl;
getch();
}

You might also like