c++ program to convert gallons to liters
Code:
/*c++ program to convert gallons to liters*/
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
float gallons,litres;
cout <<” Enter Gallons “;
cin >>gallons;
liters=gallons*3.7854;
cout <<” Litre is =” <<litres;
getch();
return 0;
}
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
float gallons,litres;
cout <<” Enter Gallons “;
cin >>gallons;
liters=gallons*3.7854;
cout <<” Litre is =” <<litres;
getch();
return 0;
}
Sample Output:
Comment bellow for your Query and Feedback