Answer to Question #343952 in C# for Xyz

Question #343952

1. Write a program in C# Sharp to create a List of numbers and display the numbers greater than 80 as output.  

Test Data :

The members of the List are :

55 200 740 76 230 482 95

Expected Output :

The numbers greater than 80 are :

200

740

230

482

95


1
Expert's answer
2022-05-23T15:17:27-0400
using System;
using System.Collections.Generic;
namespace ConsoleApp1
{
  class Program
  {
    static void Main(string[] args)
    {
      List<int> list = new List<int>() { 55, 200, 740, 76, 230, 482, 95 };
      for (int i = 0; i < list.Count; i++)
        if (list[i] > 80)
          Console.WriteLine(list[i]);
    }
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS