Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

SETTING UP ARRAY FOR TEST SCORES IN C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {


                // prompt user to ask how many test scores to build the size of the array


                Write("How many test scores total: ");
                string sSize = ReadLine();          
                int i = Convert.ToInt32(sSize);              
                int[] score = new int[i];



            // create the loop of asking the test scores limited to the array sSize

            for (int a = 1; a < i + 1; a++)
            {

                Write("Please enter a test score " + a + " from 0 to 100: ");
                string testArray = ReadLine();


                int g = Convert.ToInt32(testArray);

                int[] tests = new int[g];

                //create loop to display all test scores
                foreach (var item in tests)
                    Console.WriteLine(item);





                }

            }
        }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to assign rds CAL for users 
Csharp :: c# if loop 
Csharp :: c# printwindow 
Csharp :: unity eventtrigger blocks scrollview 
Csharp :: ado .net nullable int datareader 
Csharp :: unity disable the display of the camera frustrum 
Csharp :: c# alert message 
Csharp :: sqlite dapper bulkcopy 
Csharp :: c# md5 hash bouncycastle encypt decrypt with key 
Csharp :: how to clone something as a parent unity 
Csharp :: tuple parameter name 
Csharp :: shell32.dll c# example 
Csharp :: c# .net core 3.0 trying Exception The transaction log for database is full due to ACTIVE_TRANSACTION 
Csharp :: invalid length for a base-64 char array or string. frombase64string c#Add Answer 
Csharp :: c# getdecimal null 
Csharp :: how to integrate a c# and angular 9 
Csharp :: c# wpf datagrid extra column 
Csharp :: using randomly chars to build a string 
Csharp :: expander vertical wpf 
Csharp :: Get dwgexport setting reivit api 
Csharp :: ENUM error codes all 
Csharp :: trimend c# 
Csharp :: python mokeypatch asser called 
Csharp :: c# how to debig 
Csharp :: delegates in c# 
Csharp :: gridview column cell alignment form c# 
Csharp :: asp.net core reverse engineer database 
Csharp :: unity follow object 
Csharp :: c# check file similarities 
Csharp :: If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =