finalCCCC.docx - Room space namespace Declaring_Method class Program static void Main(string args double length height width rollcover

finalCCCC.docx - Room space namespace Declaring_Method...

This preview shows page 1 - 3 out of 8 pages.

Room space namespace Declaring_Method { class Program { static void Main(string[] args){ double length, height, width, rollcover; Console.WriteLine("Enter the length : "); length = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter the height : "); height = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter the width : "); width = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter the rollcover : "); rollcover = Convert.ToDouble(Console.ReadLine()); Program show = new Program(); show.Space(length, height, width, rollcover); } public void Space( double length, double height, double width, double rollcover){ rollcover = rollcover + 0.5; double space = (length * height * width / rollcover) / 4; Console.WriteLine("Answer = " + space); } } } namespace ConsoleApplication114 { class Program { static void Main(string[] args) { string[] shoppinglist = new string[5]; for (int i = 0; i < 5;i++ ) { Console.WriteLine("Enter your shopping list : \t "); shoppinglist[i] = Convert.ToString(Console.ReadLine()); } Console.WriteLine("\n"); for (int i = 0; i < 5; i++ ) { Console.WriteLine("You have entered {0}",shoppinglist[i]); } Console.ReadLine(); } } } Grade symbol using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int[] marks = new int[5];
Image of page 1
for (int i = 0; i < marks.Length; i++) { Console.Write("Enter Mark : "); marks[i] = int.Parse(Console.ReadLine()); } int av = (marks[0] + marks[1] + marks[2] + marks[3] + marks[4]) / 5; Console.WriteLine("Average : " + av); Console.Write("\n___________________\n"); Console.Write("Marks"); Console.Write("\tSymbols \n"); for (int i = 0; i < marks.Length; i++) { if (marks[i] >= 0 && marks[i] <= 50) { Console.WriteLine(marks[i] + "\t E"); } else if (marks[i] < 60) { Console.WriteLine(marks[i] + "\t D"); } else if (marks[i] < 70) { Console.WriteLine(marks[i] + "\t C"); } else if (marks[i] < 75) { Console.WriteLine(marks[i] + "\t B"); } else if (marks[i] <= 100) { Console.WriteLine(marks[i] + "\t A"); } } Console.ReadLine(); } } } Inheritance using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Inherit { class inheri : vehicle { public void Noise () { Console .WriteLine("All Vehicles Creates Noise !! ");
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 8 pages?

  • Fall '19
  • Height, dimes, public void Space

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes