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:
Option B and C are the correct answer for the above question
Explanation:
The above question asked about the work of the programmer to catch an error of the program--
- Then the option B states that the programmer needs to prints the value of the various program variable on every line of the program which is the correct solution because it is used to find the error easily. It defines the value of every variable in every place of the program and the programmer caught the error statement in the program if anywhere the variable gets the false value.
- The C option states to help from a friend, it is also a good solution because the friend can easily be caught the error of the program by seeing every line of code.
- But the other option is not correct because the option A states that the change the name of the variable which is not a result of anything.
- And the option D states that the code will be retyped again which is also not justify anything.
Answer:
The steps to create table, hide boarder and show border around the whole table is given below.
Explanation:
<u>1. Create Table</u>
- Click on insert Tab
- In insert tab, Click on Table
- Select No. of row and columns to create the table
<u>2. Hiding Boarders</u>
- Click on Design Tab
- In table style section Choose the layout that have no boarder
<u>3. Add boarder Around table</u>
- Click on Design Tab
- Select whole table by clicking on Plus sign on the top right corner of table
- Click on arrow of boarders button in Boarders section in design tab
- Select the "outside boarder" option from the list
<em>By following above mentioned steps, jennnine can draw a boarder around the table to distinguish it from rest of the document.</em>
Answer:
here!!
Explanation:
# Write code here...
def max_int_in_list(my_list):
highest = my_list[4]
for num in my_list:
if num > highest:
highest = num
return highest
my_list = [5, 2, -5, 10, 23, -21]
biggest_int = max_int_in_list(my_list)
print biggest_int
Answer:
Read
Explanation:
Do you have a picture? I recently did this but there is multiple questions like this one.