TEMPERATURE CONVERTER
/* Program to convert Celsius to Fahrenheit */
#include<conio.h>
#include<iostream.h>
void main()
{
float c,f;
char ch;
clrscr();
cout<<"\n\tTEMPERATURE CONVERTER \n\t[Celsius to Fahrenheit]";
do
{
cout<<"\n\tEnter tempretur in C:";
cin>>c;
f=((c*9)/5)+32;
cout<<"\n\t-------------------------------------";
cout<<"\n\tC="<<c<<" equals to F="<<f;
cout<<"\n\t-------------------------------------";
cout<<"\n\n\tEnter Y/y for more & N/n for exit:";
cin>>ch;
}while(ch=='y' || ch=='Y');
getch();
}
/* Program to convert Celsius to Fahrenheit */
#include<conio.h>
#include<iostream.h>
void main()
{
float c,f;
char ch;
clrscr();
cout<<"\n\tTEMPERATURE CONVERTER \n\t[Celsius to Fahrenheit]";
do
{
cout<<"\n\tEnter tempretur in C:";
cin>>c;
f=((c*9)/5)+32;
cout<<"\n\t-------------------------------------";
cout<<"\n\tC="<<c<<" equals to F="<<f;
cout<<"\n\t-------------------------------------";
cout<<"\n\n\tEnter Y/y for more & N/n for exit:";
cin>>ch;
}while(ch=='y' || ch=='Y');
getch();
}
No comments:
Post a Comment