Please help me with 11 & 13. C# ONLY!! Please show work, and thanks!! 11. Write
ID: 3590028 • Letter: P
Question
Please help me with 11 & 13. C# ONLY!! Please show work, and thanks!!
11. Write a program named Eggs that declares four variables to hold the number of eggs produced in a month by each of four chickens, and assign a value to each variable. Sum the eggs, then display the total in dozens and eggs. For example, a total of 127 eggs is 10 dozen and 7 eggs. Modify the Eggs program to create a new one named EggsInteractive that prompts the user for and accepts a number of eggs for each chicken. 12. Write a program named MakeChange that calculates and displays the conversion of an entered number of dollars into currency denominations-twenties, tens, fives, and ones. For example, $113 is 5 twenties, 1 ten, 0 fives, and 3 ones. 13. 14. Write a program named Testslnteractive that prompts a user for eight test scores and displays the average of the test scores to two decimal places.Explanation / Answer
Ans 11 :
I have created on console application for calculate eggs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EggsCal
{
class Program
{
static void Main(string[] args)
{
string egg1AsString,
egg2AsString,
egg3AsString,
egg4AsString;
Int32 egg1,
egg2,
egg3,
egg4,
total,
total2,
total3;
Console.WriteLine("Enter first chickens eggs");
egg1AsString = Console.ReadLine();
egg1 = Convert.ToInt32(egg1AsString);
Console.WriteLine("Enter second chickens eggs");
egg2AsString = Console.ReadLine();
egg2 = Convert.ToInt32(egg2AsString);
Console.WriteLine("Enter third chickens eggs");
egg3AsString = Console.ReadLine();
egg3 = Convert.ToInt32(egg3AsString);
Console.WriteLine("Enter fourth chickens eggs");
egg4AsString = Console.ReadLine();
egg4 = Convert.ToInt32(egg4AsString);
total = egg1 + egg2 + egg3 + egg4;
total2 = total / 12;
total3 = total2 % 12;
Console.WriteLine("Total eggs is {0} dozen and {1} eggs.", total2, total3);
Console.ReadLine();
}
}
}
Ans 13 :