need a c++ code which is related to nature

guys i need a c++ programming code which is related to nature ..... give me a code to find the annual amount of rainfsll ?
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.
Lol ^

Srry if this is spam
Last edited on
wow
lol.
realistically, you could find a site that hosts this information, and then make a program that fetches and displays the data.
closed account (18hRX9L8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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.
Last edited on
Topic archived. No new replies allowed.