Hello everyone, I am dev-c++ rookie, in fact, there will be some simple procedures, in the future, please more exchanges and discussion.
Do not say anything more, I will send some daily learning essays, will also ask some questions ...
Try a little:
Suppose that the new resources on Earth grow at a constant rate. According to this measure, the existing resources on Earth and new resources can be used for x million people live a year, or for y million people living B year. How many millions of people can the planet feed in order to achieve sustainable development and avoid depletion of resources?
Input:A row that consists of four positive integer x,a,y,b and two integers separated by a single space. X>y,a<b,ax<by, each integer is not greater than 10000
Output:A real number z, which means that the earth feeds up to Z million people, rounded to two decimal places.
Sample Input
: 110 90 90 210
Sample Output
: 75.00
#include <iostream> #include <cstdio>using namespace Std;int main () { float x,a,y,b,z; cin>>x>>a>>y>>b; z= (b*y-a*x)/(b-a); printf ("z=%0.2f\n", z); GetChar (); return 0;}
In the next section, I will explain in detail ...
The big guy can give me advice or automatic disregard, do not like to spray.
Newcomers to the big guys please more guidance (major dev-c++)