vectrapower
New member
- Joined
- May 2, 2021
- Messages
- 2
- Programming Experience
- Beginner
i am making a program that i can choose multiply times options 1 till 4 till i hit 5 that i finished my order . it is made in a windows form app.
C#:
private static int lijstaccessoires()
{
Console.WriteLine("kies uw accesoires ");
Console.WriteLine("Regendak type 1 ");
Console.WriteLine("Babystoel type 2 ");
Console.WriteLine("Smartphonehouder type 3 ");
Console.WriteLine("Helm type 4 ");
string[] acc = { "Regendak", "Babystoel", "Smartphonehouder", "Helm " };
int prijsaccessoires = 0;
int keuze;
int.TryParse(Console.ReadLine(), out keuze);
{
if (keuze == 1)
prijsaccessoires = 10;
if(keuze == 2)
prijsaccessoires = 20;
if (keuze == 3)
prijsaccessoires = 15;
if (keuze == 4)
prijsaccessoires = 15;
}
return prijsaccessoires;
Last edited by a moderator: