Preview

Cis170 Ilab 5

Satisfactory Essays
Open Document
Open Document
363 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Cis170 Ilab 5
Week 5 iLab

Part A:

using System; using System.Collections.Generic; using System.Linq; using System.Text;

namespace Lab5A
{
class Program { static void Main(string[] args) { string[] playerName = new string[100]; int[] playerScore = new int[100]; int c = 0; c=InputData(ref playerName, ref playerScore);

double avg= CalculateAverageScore(ref playerScore,c); Console.WriteLine("Name Score"); DisplayPlayerData(ref playerName, ref playerScore, c); Console.WriteLine(); Console.WriteLine("Average Score: " + avg + "\n"); Console.WriteLine("Player's Who Scored Below Average"); Console.WriteLine("Name Score"); DisplayBelowAverage(avg, ref playerName, ref playerScore,c); } static int InputData(ref string[] player, ref int[] score) { int addName = 0,counter=0;

do { Console.Write("Enter Player's Name (Q to quit): "); player[counter] = Console.ReadLine();

if (player[counter] == "q" || player[counter] == "Q") { addName = 1; } else { Console.Write("Enter score for {0}: ", player[counter]); score[counter] = Convert.ToInt32(Console.ReadLine()); counter++; } } while (addName != 1); return counter;

}

static void DisplayPlayerData(ref string[] playerName, ref int[] playerScore,int counter) { for (int i = 0; i < counter; i++) { Console.WriteLine("{0}\t\t{1}", playerName[i], playerScore[i]); }

}

static double

You May Also Find These Documents Helpful

  • Satisfactory Essays

    ECT122 W1 ILab 2

    • 302 Words
    • 2 Pages

    A conductor is made of materials that have little opposition to the flow of charge. A conductor is made of metals like copper, silver, aluminum or gold. These types of metals allows for the easy flow of electrons. Wires are made of these materials.…

    • 302 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    ECT122 Wk5 ILab 1

    • 363 Words
    • 3 Pages

    3. Download the Multisim file “Ser_Par1” from Doc Sharing, Week 5. Run the simulation and verify that the simulated results are the same as the calculated values. Were the values the same? Yes/No. If No, why not?…

    • 363 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    a1 script win213

    • 380 Words
    • 2 Pages

    Enter the book title –data type string. If the user enters a null string, the program should beep and redisplay the needed value…

    • 380 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Is3350 Unit 5

    • 880 Words
    • 4 Pages

    Electricity at work Regulations 1989. This legislation places the4 responsibility of electrical item on to the employer.…

    • 880 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    ECT122 Wk5 ILab 2

    • 403 Words
    • 2 Pages

    2. Download the Multisim file “Ser_Par2” from Doc Sharing, Week 5. Run the simulation and verify the simulated results are the same as the calculated values. Were the values the same? Yes/No. If no, why?…

    • 403 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    It210 Week 4 Psuedocode

    • 584 Words
    • 3 Pages

    Write: “Enter 6 if you would like to Quit now.” Input Display_Selection While Display_Selection ! = 1 || 2|| 3 || 4…

    • 584 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    lasb 8 IS3220

    • 390 Words
    • 2 Pages

    1. Explain why a layered security strategy helps mitigate risk and threats both external and internal.…

    • 390 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CEIS100 W5 ILab Report

    • 320 Words
    • 2 Pages

    Code—copy and paste (or type) your code below. You can also post a screenshot of the program working if you would like.…

    • 320 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Sci228 Week 2 Ilab

    • 557 Words
    • 3 Pages

    I chose this particular sweetener because I have never heard of it until now and it sparked my interest.…

    • 557 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Comp230 wk4 Ilab

    • 822 Words
    • 4 Pages

    To start simply click on the named Workstation from the device list (located on the left hand side of the screen) and click the Power on from the in tools bar. In some cases the devices may power on automatically.…

    • 822 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Comp230 W2 Ilab

    • 1120 Words
    • 5 Pages

    Student Name | | Class | Comp230 | Date | 5/16/2013 | VBScript IPO VBox Lab Report ' VBScript: NameAge.vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' = == == == ==…

    • 1120 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    IT140 Ip1

    • 1028 Words
    • 5 Pages

    Windows 7 operating system was produced for personal computers, business desktops, laptops, netbooks, tablet PCs, and media center PCs. This version was released on October 22, 2009, which was less than three years that Windows Vista was released. Windows 7 upgraded design worked with Windows Vista applications and its hardware. A few of Windows 7 new features are the advances in touch and handwriting recognition. It supports RAW image format with the addition of Windows Imaging Component. This enables previewing and metadata display in Internet explorer. Also full size viewing for slideshows in Windows Photo Viewer.…

    • 1028 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Cis51O

    • 779 Words
    • 4 Pages

    Albuquerque and Santa Fe service area, Reliable employs approximately 12 delivery personnel, 20 pharmacist’s assistants (PAs), 6 licensed pharmacists, and 10 office and clerical staff.…

    • 779 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Lab 4 MBSA Scan IT1400

    • 527 Words
    • 3 Pages

    Result: The Automatic Updates feature has not been configured on this computer. Please upgrade to the latest…

    • 527 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    ISPP CA10 8 1

    • 1254 Words
    • 8 Pages

    issue. You are required to make a 5-minute pitch (in Week16/17) based on your chosen issue, in…

    • 1254 Words
    • 8 Pages
    Powerful Essays