Answer:
- using System;
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Enter number of students: ");
- int num = Convert.ToInt32(Console.ReadLine());
- string [] firstName = new string[num];
- string [] lastName = new string[num];
-
- for(int i=0 ; i < num; i++){
- Console.WriteLine("Enter first name: ");
- firstName[i] = Console.ReadLine();
-
- Console.WriteLine("Enter last name: ");
- lastName[i] = Console.ReadLine();
- }
-
- for(int j=0; j < num; j++){
- Console.WriteLine(lastName[j] + "," + firstName[j]);
- }
- }
- }
Explanation:
Firstly, prompt user to enter number of student to be stored (Line 6- 7). Next, create two array, firstName and lastName with num size (Line 8-9).
Create a for-loop to repeat for num times and prompt user to enter first name and last name and then store them in the firstName and lastName array, respectively (Line 11 - 17).
Create another for loop to traverse through the lastName and firstName array and display the last name and first name by following the format given in the question (Line 19 - 21).
Answer:
Explanation:
The detailed and careful step by step calculation and analysis is as shown with appropriate formula in the attached files
Answer:
B. Acid rain.
C. Photochemical smog.
Explanation:
Oxides of nitrogen contribute to the formation of photochemical smog and acid rain. Photochemical smog is a type of smog produced when ultraviolet light from the sun reacts with nitrogen oxides in the atmosphere while on the other hand, when nitrogen oxide react with the water vapor in the atmosphere forming nitric acid which falls on the earth surface with the help of precipitation.
Answer:
Part A:

CPI cannot be negative so it is not possible to for program to run two times faster.
Part B:

CPI reduced by
=80%
Part C:
New Execution Time=
Increase in speed=
Explanation:
FP Instructions=50*106=5300
INT Instructions=110*106=11660
L/S Instructions=80*106=8480
Branch Instructions=16*106=1696
Calculating Execution Time:
Execution Time=
Execution Time=
Execution Time=
Part A:
For Program to run two times faster,Execution Time (Calculated above) is reduced to half.
New Execution Time=

CPI cannot be negative so it is not possible to for program to run two times faster.
Part B:
For Program to run two times faster,Execution Time (Calculated above) is reduced to half.
New Execution Time=

CPI reduced by
=80%
Part C:

New Execution Time=
New Execution Time=
Increase in speed=