none
visual basic pls help! RRS feed

  • Question

  • ok so i started programming 2 days ago and i started wwith c#! i downloaded visual studio 2015 and writted a bunch of programs! but now im stuck with a problem! so im trying to write a program that guesses your chosen number! i know it can be done llike this:using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace ConsoleApplication3
    {
        class Program
        {
            static void Main(string[] args)
            {
                string number;

                Console.WriteLine("Choose a number!");
                number = Console.ReadLine();

                Console.WriteLine("Your number is " + number);
                Console.ReadLine();

            }
        }
    }

    but i want to do it with some questions! Like i ask is the number higher than 100? and if they say yes i guess the number! or is the nubmer lower than 100? and if they say yes i guess the number! but i want both of these questions in 1 program! i tried if/else statements but i dont know how since when i use int i need to put a value of the number which i dont know yet since the "player" is going to chose it! can i get some help please?????

    Tuesday, July 28, 2015 10:33 PM

Answers