Mohamed alamrouni 3787
Answer 1:
#include <iostream>
using namespace std ;
int main () {
double distance ;
cout <<"enter distance in kilometers\n" ;
cin >> distance;
cout << "the equivalent is " << distance*1.61 << " miles" ;
return 0;
}
Answer 2:
#include <iostream>
using namespace std ;
int main () {
double age ;
cout << "enter your age\n" ;
cin >> age ;
cout << "your age in months is " << age*12 << "months" ;
return 0 ;
}
Answer 3:
#include <iostream>
using namespace std ;
int main () {
double temperature ;
cout << "enter the temperature in celsius\n" ;
cin >> temperature ;
cout << "the equivalent temperature in fahrenhiet is " << 1.8*temperature+32 ;
return 0 ;
}
Answer 4:
#include <iostream>
using namespace std ;
int main () {
int hours ;
int minutes ;
cout << "enter the number of hours amd minutes\n" ;
cin >> hours ;
cin >> minutes ;
cout << "the time is " << hours << ":" << minutes ;
return 0 ;
}
Answer 5:
#include <iostream>
using namespace std ;
int main () {
double lyears ; // lyears = light years
cout << "enter the the number of light years that you want in astronomical units\n" ;
cin >> lyears ;
cout << lyears << " light years " << "are " << lyears * 63.240 << " astronomical units" ;
return 0 ;
}