Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int jump, winner = 0, maxjump = 0;
- for (int i = 1; i <= 8; i++)
- {
- jump = int.Parse(Console.ReadLine());
- maxjump = Math.Max(jump, maxjump);
- if (maxjump == jump)
- {
- winner = i;
- }
- }
- Console.WriteLine("Student number " + winner + " jumped the max, he jumped " + maxjump + " meters");
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment