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:
#include <stdio.h>
typedef struct InventoryTag_struct {
int itemID;
int quantityRemaining;
} InventoryTag;
int main(void) {
InventoryTag redSweater;
redSweater.itemID = 314;
redSweater.quantityRemaining = 500;
/* Your solution goes here */
printf("Inventory ID: %d, Qty: %d\n",redSweater.itemID,redSweater.quantityRemaining);
getchar();
return 0;
}
Explanation:
Answer:
Heat losses by convection, Qconv = 90W
Heat losses by radiation, Qrad = 5.814W
Explanation:
Heat transfer is defined as the transfer of heat from the heat surface to the object that needs to be heated. There are three types which are:
1. Radiation
2. Conduction
3. Convection
Convection is defined as the transfer of heat through the actual movement of the molecules.
Qconv = hA(Temp.final - Temp.surr)
Where h = 6.4KW/m2K
A, area of a square = L2
= (0.25)2
= 0.0625m2
Temp.final = 250°C
Temp.surr = 25°C
Q = 64 * 0.0625 * (250 - 25)
= 90W
Radiation is a heat transfer method that does not rely upon the contact between the initial heat source and the object to be heated, it can be called thermal radiation.
Qrad = E*S*(Temp.final4 - Temp.surr4)
Where E = emissivity of the surface
S = boltzmann constant
= 5.6703 x 10-8 W/m2K4
Qrad = 5.6703 x 10-8 * 0.42 * 0.0625 * ((250)4 - (25)4)
= 5.814 W