Változók és műveletek
This commit is contained in:
23
Valtozok/Input/Program.cs
Normal file
23
Valtozok/Input/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Input
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Felhasználói input");
|
||||
|
||||
Console.Write("Adja meg az első számot:");
|
||||
int szam1=Convert.ToInt32(Console.ReadLine());
|
||||
Console.Write("Adja meg a második számot:");
|
||||
int szam2=Convert.ToInt32(Console.ReadLine());
|
||||
|
||||
int osszeg = szam1 + szam2;
|
||||
Console.WriteLine($"Összeg:{osszeg}");
|
||||
int szorzat = szam1 * szam2;
|
||||
Console.WriteLine($"Szorzat:{szorzat}");
|
||||
double osztas =(double) szam1 / szam2;
|
||||
Console.WriteLine($"Hányados:{osztas}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user