Answer:
// program in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// string array
string m[3];
// array to store rainfall
double rainfall[3];
// variables
double avg_rainfall,sum=0;
for(int i=0;i<3;i++)
{
cout<<"Enter name of month "<<i+1<<" :";
// read month name
cin>>m[i];
cout<<"Enter rainfall (inches) in month "<<i+1<<" :";
// read rainfall
cin>>rainfall[i];
// sum of rainfall
sum+=rainfall[i];
}
// Average rainfall
avg_rainfall=sum/3;
// print Average rainfall
cout<<"Average rainfall for "<<m[0]<<","<<m[1]<<","<<m[2]<<" is "<<avg_rainfall<<" inches."<<endl;
return 0;
}
Explanation:
Create string array "m" to store name of month and double array "rainfall" to store rainfall. Read name of 3 months and rainfall in that month.Find the sum of all the rainfall and the average rainfall.Print the average rainfall of 3 months.
Output:
Enter rainfall (inches) in month 2 :45
Enter name of month 3 :july
Enter rainfall (inches) in month 3 :43
Average rainfall for may,june,july is 42.6667 inches.
Answer:
Variable Where Declared
In Sub1 :
A Sub1
Y Sub1
Z Sub1
X Main
In Sub2:
A Sub2
B Sub2
Z Sub2
Y Sub1
X Main
In Sub3 :
A Sub3
X Sub3
W Sub3
Y Main
Z Main
Explanation:
In static-scoped languages with nested subprograms, the declaration of a variable is checked with the subprogram, if it is not found, it check within the parent method that called it, it continue until it find a declaration, if no declaration is found, it display an error.
In Sub1, a, y, z is declared there while the declaration of x is found in main.
In Sub2, a, b, z is declared, declaration of y is found in sub1 and declaration of x is found in main.
In Sub3, a, x, w is declared while the declaration of y, z is from the main.
1. The answer to the question what is scratch programming is a language and an online community where children can program and share interactive media
2. The answer to the question what is a sprite is a two dimensional bitmap that is intergrated into a larger scence.
Hope this helps
If you don't understand plz message me
If you do plz brainlest me
If you need help with any other tecnology questions you can also message me for that too.
Thank you and have a wonderful day!!!
Answer B) Headers
Explanation:
I just took a Tech class, im pretty sure its headers. Hope this helps! -3-
Answer:
yourmom.com yourhaouse.com and mcdonalds.org
Explanation: