0% found this document useful (0 votes)
108 views2 pages

Nama: Muhamad Amirudin NPM: 18313026 Kelas: TI 18 B Using Using Using Using Using Namespace Class Static Void String String Int

The document contains a C# program that takes in a student's name, student ID number, and test score as input. It then displays the student's name and ID, and determines the letter grade based on the test score, ranging from A for scores 80 and above to E for scores below 50. The program allows the user to repeat the process by selecting Y or N at the end.

Uploaded by

amir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views2 pages

Nama: Muhamad Amirudin NPM: 18313026 Kelas: TI 18 B Using Using Using Using Using Namespace Class Static Void String String Int

The document contains a C# program that takes in a student's name, student ID number, and test score as input. It then displays the student's name and ID, and determines the letter grade based on the test score, ranging from A for scores 80 and above to E for scores below 50. The program allows the user to repeat the process by selecting Y or N at the end.

Uploaded by

amir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama : Muhamad Amirudin

NPM : 18313026
Kelas : TI 18 B

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

namespace Muhamad_Amirudin
{
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());

{
Console.WriteLine("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
Console.WriteLine(" PROGRAM DATA NILAI MAHASISWA ");
Console.WriteLine("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
{
Console.WriteLine();
Console.WriteLine("Nama : {0}", nama);
Console.WriteLine("NPM : {0}", npm);
}
}

if (nilai >= 80)


{
Console.WriteLine("\t\tNilai A");
}
else if (nilai >= 70)
{
Console.WriteLine("\t\tNilai B");
}
else if (nilai >= 60)
{
Console.WriteLine("\t\tNilai C");
}
else if (nilai >= 50)
{
Console.WriteLine("\t\tNilai D");
}
else
{
Console.WriteLine("\t\tNilai 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