Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace glosor
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello, please enter how many questions you would like to have on this reapeting test");
- int numberofquestions = Convert.ToInt32(Console.ReadLine());
- while(numberofquestions > 0)
- {
- Console.WriteLine(" what do you want question number " + numberofquestions + " to be?");
- QuestionAndAnswer question = new QuestionAndAnswer(null,null);
- question.answer = Console.ReadLine();
- Console.WriteLine(" what do you want question number " + numberofquestions + "'s answer to be?");
- question.answer = Console.ReadLine();
- numberofquestions--;
- QuestionAndAnswer.numberofquestions++;
- }
- }
- class QuestionAndAnswer{
- public string question;
- public string answer;
- public static int numberofquestions;
- public QuestionAndAnswer(string _question,string _answer)
- {
- question = _question;
- answer = _answer;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement