Facebook
From Laura Quitério, 4 Years ago, written in C#.
Embed
Download Paste or View Raw
Hits: 186
  1. using System;
  2.                                        
  3. public class Program
  4. {
  5.         public static void Main()
  6.         {
  7.                 int n1,n2,n3;
  8.                 Console.WriteLine("Primeira nota: ");
  9.                 n1=int.Parse(Console.ReadLine());
  10.                 Console.WriteLine("Segunda nota: ");
  11.                 n2=int.Parse(Console.ReadLine());
  12.                                 Console.WriteLine("Terceira nota: ");
  13.                                 n3=int.Parse(Console.ReadLine());
  14.                
  15.                 int media;
  16.                 media=(n1+n2+n3)/3;
  17.                 if(media<10){
  18.                         Console.WriteLine("Reprovado");
  19.                 }else{
  20.                         Console.WriteLine("Aprovado");
  21.                 }
  22.                 if(media>15){
  23.                         Console.WriteLine("Estás no bom caminho!");
  24.                 }else{
  25.                         Console.WriteLine("Força, tu consegues!");
  26.                 }
  27.                
  28.                 Console.WriteLine("Nota: "+media);
  29.         }
  30. }

Replies to exercício média_v2 rss

Title Name Language When
Re: exercício média_v2 Paltry Shama csharp 4 Years ago.