Advertisement
cuniszkiewicz

Pierwszy

Apr 13th, 2025
266
0
28 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace PierwszeZajecia
  8. {
  9.     internal class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string imie, nazwisko, mail;
  14.             int wiek;
  15.             double sredniaOcen;
  16.  
  17.             Console.Write("Podaj imię: ");
  18.             imie = Console.ReadLine();
  19.             Console.Write("Podaj nazwisko: ");
  20.             nazwisko = Console.ReadLine();
  21.             Console.Write("Podaj wiek: ");
  22.             //wiek = int.Parse(Console.ReadLine());
  23.             wiek = Convert.ToInt32(Console.ReadLine());
  24.            
  25.             Console.Write("Podaj średnią ocen: ");
  26.             //sredniaOcen = double.Parse(Console.ReadLine());
  27.             sredniaOcen = Convert.ToDouble(Console.ReadLine());
  28.  
  29.            
  30.             mail = imie + "." + nazwisko + "@byd.pl";
  31.            
  32.  
  33.  
  34.             //Console.WriteLine("Cześć " + imie + " " + nazwisko + ", wiek: "+ wiek + " lat");
  35.             //Console.WriteLine("Cześć {0} {1}, wiek: {2} lat",imie, nazwisko, wiek);
  36.             Console.WriteLine($"Cześć {imie} {nazwisko}, wiek: {wiek} lat");
  37.            
  38.  
  39.            
  40.  
  41.             Console.ReadKey(); //program zaczeka na wciśnięcie przycisku
  42.         }
  43.     }
  44. }
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement