#include <iostream.h>
#include <conio.h>
void main()
{
float celcius, fahrenheit;
char lagi;
clrscr();
cout<<"Konversi Celcius ke Fahrenheit\n\n";
do
{
cout<<"Masukkan Nilai Celcius : ";
cin>>celcius;
fahrenheit = 1.8*celcius+32;
cout<<celcius<<" Celcius "<<" = "<<fahrenheit<<" Fahrenheit\n\n";
cout<<"Hitung Lagi (Y/T)?";
cin>>lagi;
}
while ((lagi=='Y')||(lagi=='y'));
getch();
}
#include <conio.h>
void main()
{
float celcius, fahrenheit;
char lagi;
clrscr();
cout<<"Konversi Celcius ke Fahrenheit\n\n";
do
{
cout<<"Masukkan Nilai Celcius : ";
cin>>celcius;
fahrenheit = 1.8*celcius+32;
cout<<celcius<<" Celcius "<<" = "<<fahrenheit<<" Fahrenheit\n\n";
cout<<"Hitung Lagi (Y/T)?";
cin>>lagi;
}
while ((lagi=='Y')||(lagi=='y'));
getch();
}
Tidak ada komentar:
Posting Komentar