Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

NAMA : RIYANTO

NPM : 18313009
KELAS : TI 18 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace tugas_bapak_najib
{
class Program
{
static void Main(string[] args)
{
string nama, pilihan;
int nilai, npm;

mulai:
Console.Clear();

Console.Write("Masukkan Nama Mahasiswa : ");


nama = Console.ReadLine();
Console.Write("Masukkan NPM : ");
npm = int.Parse(Console.ReadLine());
Console.Write("Masukkan Nilai : ");
nilai = int.Parse(Console.ReadLine());

if (nilai >= 80)


{
Console.WriteLine("Nilai A");
}
else if (nilai >= 70)
{
Console.WriteLine("Nilai B");
}
else if (nilai >= 60)
{
Console.WriteLine("Nilai C");
}
else if (nilai >= 50)
{
Console.WriteLine("Nilai D");
}
else
{
Console.WriteLine("Nilai E");
}
Console.Write("\nApakah anda ingin mengulangi [Y/N] : ");
pilihan = Console.ReadLine();
if (pilihan == "Y" || pilihan == "y")
{
goto mulai;
}

Console.ReadKey();
}
}
}

You might also like