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);
}
}
}
}
Also in C#:
- C# .net core convert to int round up
- how to find the area of a circle
- How to execute script in C#
- unity next scene
- unity indestructible
- c# rsa example
- format float to time c#
- how to remove file changes in git
- c# try catch error
- unity add component
- ecs get specific entities with component
- c# change material in code
- c# fileupload example
- C# webclient immitate browser
- C# get all files in directory
- c# make string null
- C# array to label
- c# string remove special characters
- Unity C# make object face away
- unity while in trigger
- c#if
- c# max sequence contains no elements
- c sharp string interpolation
- increase variable C#