LePetitGlacon

FICHE 3 Exercice 12

Sep 16th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2.  
  3. namespace b
  4. {
  5.     class Program
  6.     {
  7.     public static void Main(string[] args)
  8.     {
  9.          
  10.            
  11.             int total;
  12.            
  13.            
  14.            
  15.             Console.WriteLine("Entrer note 1 : ");
  16.             int priseDeNote = int.Parse(Console.ReadLine());
  17.             total = priseDeNote;
  18.            
  19.             Console.WriteLine("Entrer note 2 : ");
  20.             priseDeNote = int.Parse(Console.ReadLine());
  21.             total = total + priseDeNote;
  22.            
  23.             Console.WriteLine("Entrer note 3 : ");
  24.             priseDeNote = int.Parse(Console.ReadLine());
  25.             total = total + priseDeNote;
  26.            
  27.             Console.WriteLine("Entrer note 4 : ");
  28.             priseDeNote = int.Parse(Console.ReadLine());
  29.             total = total + priseDeNote;
  30.            
  31.             float moyenne = total / 4F;
  32.            
  33.            
  34.             Console.WriteLine("Votre moyenne est de : " + moyenne + " sur 20.");
  35.            
  36.              Console.ReadKey(true);
  37.     }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment