Place a std::vector<raindrop> outside in an ideal location for collecting raindrops for a year. At the end of the year divide number of drops by the number of days per year and you have your answer in raindrops per day.
#include <iostream>
int main(void)
{
double inofrain;
std::cout<<"How many inches of rain have fallen last year? ";
std::cin>>inofrain;
std::cin.ignore();
std::cout<<std::endl<<"It rained an average of "<<inofrain/365<<" a day last year.";
std::cout<<std::endl<<"It rained an average of "<<(inofrain/365)/24<<" a hour last year.";
std::cout<<std::endl<<"It rained an average of "<<((inofrain/365)/24)/60<<" a minute last year.";
std::cout<<std::endl<<"it rained an average of "<<(((inofrain/365)/24)/60)/60<<" a second last year.";
std::cout<<std::endl<<std::endl<<"Press \'enter\' to continue...";
std::cin.ignore();
return(0);
}
Is this fine?
EDIT: Oh you want it like a rain catcher? Okay so make a rain catcher. Then create a robot with a laser that measures light speed. Then write a program to move the robot across the rain catcher. Count the number of seconds until the speed of light returns to the speed of light in air (not in water). Then do simple calculations with the seconds to get inches of rain. Save this in a text document. Save the time also. When time info year is next year, add total to document and display it on a LED panel.