Program of nested loop - c# program, DOT NET Programming

Assignment Help:

Program of Nested Loop - C# Program

I am a learner of C# language and i am struggling with the Loops in c#. Can you have any code examples for this.


Related Discussions:- Program of nested loop - c# program

Explain the new features in ado.net entity framework 4.0, Explain the new f...

Explain the new features in ADO.NET Entity Framework 4.0. ADO.NET Entity Framework 4.0 is introduced in .NET Framework 4.0 and contain the following new features: Persisten

System.argumentexception in .net, I have a site that's already fully develo...

I have a site that's already fully developed, and need to solve some small issue (Text editor posting error, and a Server error caused by some Nhibernate code.) Server Error in

Very very boards, Very, Very Boards does a big business in shirts, especial...

Very, Very Boards does a big business in shirts, especially for groups and teams. They need a project that will calculate the price for individual orders, as well as a summary for

Simple task on analysis svn and github, Project Description: Simple task...

Project Description: Simple task on analysis svn and github .NET, PHP, Engineering, Software Architecture

Web server connections, Question 1 Discuss the following with respect to ....

Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain

It governance definition, IT governance defined In this section, a shor...

IT governance defined In this section, a short literature survey will be conducted. The results will be presented in a final comparative table. Before starting defining IT gove

How do we provide parameters to the stored procedures?, The ADO.NET gives t...

The ADO.NET gives the SqlCommand object which gives the functionality of executing the stored procedures. CREATE PROCEDURE SelectByEmployee @FirstName nvarchar(200) AS Se

Current culture of the environment in windows and asp.net, How we get the c...

How we get the current culture of the environment in windows and ASP.NET? The "CultureInfo.CurrentCulture" represents the current culture of the environment. For illustrate if

Does the performance for viewstate vary?, The Performance of the viewstate ...

The Performance of the viewstate varies depending on the type of server control to which it is applied. The Text Box, Label,   RadioButton,CheckBox, and HyperLink are server contro

What is manifest, Manifest Assembly metadata is always stored in the Ma...

Manifest Assembly metadata is always stored in the Manifest. Manifest consists of all metadata required to do the following things: 1) Version of assembly 2) Security ident

Archie

2/11/2013 8:10:27 AM

Try this code:

using System;  

class MarksRange

{

public static void Main()

{    int i, count80 = 0, count60 = 0, count40 = 0, count0 = 0;

float [] marks = {57.5F, 45.9F, 98.01F, 56.4F, 46.5F, 80, 82, 67,76,49, 91,55, 78,79, 19.5F, 25.8F, 35, 36,35,28,25.8F,46,55,59,68,97,85,48.5F,67,84};    

   for (i = 0; i<=29; i++)    

  {

    If (marks[i] > 80 && marks [i] < 101)

   {

    count80 = count80 + 1;

   }

    else if(marks [i] > 60 && marks[i] < 81)

   {

    count60 = count60 + 1;

   }

    else if(marks [i] > 40 && marks[i] < 61)

   {

    count40 = count40 + 1;

   }

    else

   {

    count0 = count0 + 1;

   }

  }  

  Console.WriteLine("Students in the range of 81 - 100 : "+ count80);

  Console.WriteLine("Students in the range of 61 - 80  : "+ count60);

  Console.WriteLine("Students in the range of 41 - 60  : "+ count40);

  Console.WriteLine("Students in the range of 0 - 40   : "+ count0);  

  Console.ReadLine();  

 }

}

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd