how to make each program for 12 also give to pseudocode plea
how to make each program for 1,2 also, give to pseudocode
please using for visual studio c++
Program #1 This problem is a modification of Problem 11 on page 81 of the text. In that problem is described a car that can go 23.5 miles per gallon when driven in town and 28.9 miles per gallon when driven on the highway. The problem in the book then asks the programmer to calculate how far that car can go on one tank of gas under both conditions. Let\'s modify that problem in the following way. We\'ll assume that the user of the program is going to take a trip, and that part of the trip will be on the highway and part of it will be in town. Have your program ask the user how far he has to go under each condition. Your program will then print out the total number of gallons required for the trip. For example, let\'s say the user plans to take a trip that will require 120 miles of in-town driving and 250 miles of highway driving (we\'re not trying to be realistic Your program run might look like the following: Please enter the number of in-town driving miles 120 Please enter the number of highway driving miles 250 The total number of gallons required is 13.8 gal. As usual, we should print out a prompt when asking the user for information. For clarity, we should also print out an explanatory statement when printing a value to the screen. This week, we are going to talk about how to get data from the keyboard. In C++ we use the cin object to do that.Solution
program 1:-
psuedo code:-
1.input the number of miles in highway inhighwaymiles
2.input the number of miles in town road intownmiles
3.print the value of highwaymiles/28.9 + townmiles/28.9
source code:-
#include<iostream>
using namespace std;
int main()
{
double inhighwaymiles,intownmiles;
cout<<\"please enter the number of intownmiles\"<<endl;
cin>>intownmiles;
cout<<setprecision(2)<<\"please enter the number of inhighwaymiles\"<<endl;
cin>>inhighwaymiles;
int c;
c=(intownmiles/23.5)+(inhighwaymiles/28.9);
cout<<setprecision(2);<<\"The total number of required gallons is\"<<c<<endl;
return 0;
}
program 2:-
source code:-
#include<iostream>
using namespace std;
int main()
{
int f,c,k,a,b,p,q,r,s;
cout.setprecision(2);
cout<<\"please enter a number in degrees celsius\"<<endl;
cin>>c;
a=(9/5)*c+32;
cout<<setprecision(2);<<\"The equivalent fahrenheit temperature is\"<<a<<endl;
b=c+273.15;
cout<<setprecision(2);<<\"The equivalent kelvin temperature is\"<<b<<endl;
cout<<\"please enter the number in degrees fahrenheit\"<<endl;
cin>>f;
p=(5*f-160)/9;
cout<<setprecision(2);<<\"The equivalent celsius temperature is\"<<p<<endl;
q=p+273.15;
cout<<setprecision(2);<<\"The equivalent kelvin temperature is\"<<p<<endl;
cout<<\"please enter the number in degrees kelvin\"<<endl;
cin>>k;
r=k-273.15;
cout<<setprecision(2);<<\"The equivalent celsius temperature is\"<<r<<endl;
s=(9/5)*r+32;
cout<<<setprecision(2);<\"The equivalent fahrenheit temperature is\"<<r<<endl;
return 0;
}

