Friday, September 30, 2022

Lesson of Visual studio (Pt2)

 Visual studio (pt2) Vending Machine

still learning to input values and the difference between int and string also = and == 

class Program

    {

        


        static void Main(string[] args)

        {

            Console.WriteLine("Please select your item of choice");

            Console.WriteLine("A1");//goes to five or something, but all start at 1 

            Console.WriteLine("B2");

            Console.WriteLine("C3");


            string choice = Console.ReadLine();


            if (choice == "A1") //or A1 to A5

            {

                Console.WriteLine("you have selected A1 please choose payment method");


            }


            string choice2 = Console.ReadLine();


            if (choice == "B2") //or B1 to B5

            {

                Console.WriteLine("you have selected B2 please choose payment method");

            }


            string choice3 = Console.ReadLine();


            if (choice == "C3") //or C1 to C3

            {

                Console.WriteLine("you have selected B2 please choose payment method");

            }


        }

    }

}


No comments:

Post a Comment

3D Maya Themed Diorama

This is my themed diorama work I did a campsite kind of thing with a caravan, a tent, bushes, rocks, trees and fences. I wanted to this mode...