Answer:
#include <iostream>
using namespace std;
int main() {
float rainfall_inch,rainfall_mm;//declaring two variables of float type to hold the value rain in inches and mm.
cin>>rainfall_inch;//taking input of rain in inches..
rainfall_mm=rainfall_inch*25.4;//conveting inches to mm and storing in raingfall_mm.
cout<<rainfall_inch<<" inches = "<<rainfall_mm<<" mm of rain"<<endl;//printing the output.
return 0;
}
Explanation:
The above written program is in c++ for converting the rainfall in inches to mm.
I have taken two variables of type float to store the values of rainfall in inches and mm.
Conversion of inches to mm.
Printing the result.