0% found this document useful (0 votes)
58 views5 pages

NIM: 18104410007 Nama: Ananda Dwi Oktavianto 1. Program Biodata Program

The document contains 5 C# programs written by Ananda Dwi Oktavianto: 1) A biodata program that asks the user to input personal details and prints them. 2) A time conversion program that converts seconds to hours, minutes and seconds. 3) A temperature conversion program that converts Celsius to Fahrenheit, Reamur and Kelvin. 4) Two additional temperature conversion programs by another student.

Uploaded by

happy fasnuari
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)
58 views5 pages

NIM: 18104410007 Nama: Ananda Dwi Oktavianto 1. Program Biodata Program

The document contains 5 C# programs written by Ananda Dwi Oktavianto: 1) A biodata program that asks the user to input personal details and prints them. 2) A time conversion program that converts seconds to hours, minutes and seconds. 3) A temperature conversion program that converts Celsius to Fahrenheit, Reamur and Kelvin. 4) Two additional temperature conversion programs by another student.

Uploaded by

happy fasnuari
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/ 5

NIM : 18104410007

NAMA : ANANDA DWI OKTAVIANTO


1. PROGRAM BIODATA
PROGRAM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NANDA1
{
class Program
{
static void Main(string[] args)
{
string namalengkap, namapanggilan, nim, umur, tempatlahir, telepon, alamat;

Console.WriteLine();
Console.WriteLine("\t\t\t\t\t\t=============================");
Console.WriteLine("\t\t\t\t\t\t*** Program Biodata ***");
Console.WriteLine("\t\t\t\t\t\t=============================");

Console.WriteLine();
Console.WriteLine();

Console.Write(" 1. Nama Lengkap : ");


namalengkap = Convert.ToString(Console.ReadLine());

Console.Write(" 2. Nama Panggilan : ");


namapanggilan = Convert.ToString(Console.ReadLine());

Console.Write(" 3. Nim : ");


nim = Convert.ToString(Console.ReadLine());

Console.Write(" 4. Umur : ");


umur = Convert.ToString(Console.ReadLine());

Console.Write(" 5. Tempat Lahir : ");


tempatlahir = Convert.ToString(Console.ReadLine());

Console.Write(" 6. Telepon : ");


telepon = Convert.ToString(Console.ReadLine());

Console.Write(" 7. Alamat : ");


alamat = Convert.ToString(Console.ReadLine());

Console.WriteLine();

Console.Write(" Assalamualaikum let me intoduce my self. My Name is " +


namalengkap);
Console.Write(" , but you can call me " + namapanggilan);
Console.Write(" . My nim is " + nim);
Console.Write(" . I was born in " + tempatlahir);
Console.Write(" and i am " + umur);
Console.Write(" years old.");
Console.Write(" I am glad if you want to invite my house in " + alamat);
Console.Write(" . So, don't forget to call me before with the number " +
telepon);
Console.Write(" .Thank You.");
Console.ReadKey();
}
}
}
COMPILE DAN RUN

2. PROGRAM KONVERSI WAKTU


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

namespace NANDA2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine();
Console.WriteLine("\t\t======================================");
Console.WriteLine("\t\t| *Program Konversi Waktu* |");
Console.WriteLine("\t\t| *Ananda Dwi Oktavianto* |");
Console.WriteLine("\t\t| *Kelas = TI A* |");
Console.WriteLine("\t\t======================================");

Console.WriteLine();

Console.Write(" ==> Masukkan Detik yang Hendak Dikonversi : ");


int detik = Convert.ToInt32(Console.ReadLine());
int jam;
jam = detik / 3600;
int b = jam * 3600;
int menit = (detik - b) / 60;
int second = (detik - b) % 60;

Console.WriteLine();
Console.Write(" => " + jam + " jam " + menit + " menit " + second + "
detik");

Console.WriteLine();
Console.ReadKey();
}
}
}
COMPILE DAN RUN

3. PROGRAM KONVERSI SUHU


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

namespace NANDA3
{
class Program
{
static void Main(string[] args)
{
int celcius, kelvin;
float reamur, fahrenheit;

Console.WriteLine("\t============================== ");
Console.WriteLine("\t| Program Konversi Suhu | ");
Console.WriteLine("\t| Ananda Dwi Oktavianto | ");
Console.WriteLine("\t| Kelas TI A | ");
Console.WriteLine("\t============================== ");

Console.WriteLine();

Console.Write("\t Masukkan Nilai Suhu Celcius = ");


celcius = Convert.ToInt32(Console.ReadLine());

fahrenheit = (float)celcius * 9 / 5 + 32;


reamur = (float)celcius * 4 / 5;
kelvin = celcius + 273;

Console.WriteLine("\t Nilai Suhu Fahrenheit = " + fahrenheit);


Console.WriteLine("\t Nilai Suhu Reamur = " + reamur);
Console.WriteLine("\t Nilai Suhu Kelvin = " + kelvin);

Console.ReadKey();
}
}
}

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

namespace konversi_suhu
{
class Program
{
static void Main(string[] args)
{
int celcius, kelvin;
float reamur, fahrenheit;

Console.WriteLine("\t============================== ");
Console.WriteLine("\t| Program Konversi Suhu | ");
Console.WriteLine("\t| Happy Andrian Dwi Fasnuari | ");
Console.WriteLine("\t| Prodi TI A | ");
Console.WriteLine("\t============================== ");

Console.WriteLine();

Console.Write("\t Masukkan Nilai Suhu Celcius = ");


celcius = Convert.ToInt32(Console.ReadLine());

fahrenheit =(float) celcius * 9 / 5 + 32;


reamur = (float)celcius * 4 / 5;
kelvin = celcius + 273;

Console.WriteLine("\t Nilai Suhu Fahrenheit = " + fahrenheit);


Console.WriteLine("\t Nilai Suhu Reamur = " + reamur);
Console.WriteLine("\t Nilai Suhu Kelvin = " + kelvin);

Console.ReadKey();
}
}
}

You might also like