Question: Study the incomplete code below that calculates the total rainfall and average rainfall for Cape Town during May in mm . Select two ( 2
Study the incomplete code below that calculates the total rainfall and average rainfall for Cape Town during May in mm
Select two options below for the correct code i and ii that will perform the necessary calculations.
Incorrect options will be negatively marked
double rainfall ;
i
total rainfall
ii
average rainfall
print
Console.WriteLineTotal rainfall for Cape Town in May mm: totalRainfall;
Console.WriteLineAverage rainfall for Cape Town in May mm: averageRainfall;
a
i
total rainfall
double totalRainfall ;
for int i ; i rainfall.Length; i
totalRainfall rainfalli;
b
ii
average rainfall
double averageRainfall ;
averageRainfall totalRainfall rainfall.Length;
c
i
total number of rainfall
double totalRainfall ;
for int i ; i rainfall.Length; i
totalRainfall rainfalli;
d
ii
average rainfall
double averageRainfall totalRainfall rainfall.Length ;
e
i
total number of rainfall
double totalRainfall ;
for int i ; i rainfall.Length; i
totalRainfall rainfalli;
f
ii
average rainfall
double averageRainfall rain
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
