Contoh Program Input/output dengan C#


Contoh Program input/output c#

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string nama_lengkap, nama_panggilan, tempat_lahir, alamat, input, nim, telepon;
            int umur;
            Console.WriteLine("============THE EXAMPLE OF MY PROGRAM===============");
            Console.Write("Enter your name =");
            nama_lengkap = Console.ReadLine();
            Console.Write("Enter your nick name =");
            nama_panggilan = Console.ReadLine();
            Console.Write("Enter your NIM=");
            nim = Console.ReadLine();
            Console.Write("Born Place =");
            tempat_lahir = Console.ReadLine();
            Console.Write("Enter your old=");
            input = Console.ReadLine();
            int.TryParse(input, out umur);
            Console.Write("Enter your address =");
            alamat = Console.ReadLine();
            Console.Write("Enter your telephone number =");
            telepon = Console.ReadLine();
            Console.WriteLine("");

            Console.Write ("Assalamualaikum....let me introduce my self my name is {0},but you can call me {1},my NIM is {2},i was born in {3},and i'am {4} years old.i'm very glad if you want to invite my house in {5},so don't forget to call me before with the number telepon {6}.thank you", nama_lengkap, nama_panggilan, nim, tempat_lahir, umur, alamat, telepon);
            Console.ReadLine();

        }
    }
}

1 komentar:

{ Admin } at: 29 November 2017 pukul 19.26 mengatakan...

terimakasih, infonya sangat bermanfaat

Posting Komentar

 

arpina © 2011 Design by Best Blogger Templates | Sponsored by HD Wallpapers