Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace dd
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //programma che che faccia
  14.  
  15.  
  16.  
  17.             Console.WriteLine("Hey,inserisci il numero di alunni");
  18.  
  19.  
  20.             int alunni = Convert.ToInt32(Console.ReadLine());
  21.  
  22.  
  23.             float somma,media, max, min;
  24.  
  25.             float[] voto = new float[alunni];
  26.  
  27.             string[] nome = new string[alunni];
  28.  
  29.             for ( int i = 0; i < alunni; i++ )
  30.  
  31.             {
  32.                 Console.WriteLine("inserisci il voto");
  33.  
  34.                 voto[i] = int.Parse(Console.ReadLine());
  35.  
  36.                 Console.WriteLine("inserisci a chi appartiene");
  37.  
  38.                 nome [i] = Console.ReadLine();
  39.  
  40.                 Console.WriteLine($"Hai inserito il voto {voto[i]} di {nome[i]}");
  41.  
  42.  
  43.  
  44.             }
  45.  
  46.            
  47.  
  48.            
  49.  
  50.  
  51.         }
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement