Advertisement
Abdula_2314124

Untitled

Mar 10th, 2024
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2.  
  3. namespace TheBestPlayer
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //string[] names = { "OLeg", "Matviy", "Glib", "Mihaylo", "Petrys"};
  10.             //int[] scores = { 30, 1000, 50000, 60, 70 };
  11.  
  12.             //int maxScore = 0;
  13.             //int maxIndex = 0;
  14.  
  15.             //for (int i = 0; i < scores.Length; i++)
  16.             //{
  17.             //    if (maxScore < scores[i])
  18.             //    {
  19.             //        maxIndex = i;
  20.             //        maxScore = scores[i];
  21.             //    }
  22.             //}
  23.  
  24.             //Console.WriteLine(names[maxIndex] + " " + maxScore);
  25.  
  26.  
  27.  
  28.  
  29.             int[] marks = { 1, 25, 6, 7, 4, 8 };
  30.             int sumMarks = 0;
  31.  
  32.             for (int i = 0; i < marks.Length; i++)
  33.             {
  34.                 sumMarks += marks[i];
  35.             }
  36.  
  37.             Console.WriteLine(sumMarks);
  38.         }
  39.     }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement