new to c++

Updated on December 6, 2017 in [C] Beginner
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on December 4, 2017

Just wondering if my coding could be too simple?

start:

Console.WriteLine(” What is 10 divided by 2?”);

int answer = Convert.ToInt32(Console.ReadLine());

if (answer == 5) { Console.WriteLine(“That is correct!”);

} else {

Console.WriteLine(“wrong! Try again”); }

Console.ReadLine();

goto start;

vs

Start:

int num01

int num02

Console.WriteLine (” What is 200 divided by 100? “);

int Answer = Convert.ToInt32 (Console.ReadLine ());

if (Answer == 20000) {

Console.WriteLine (” Well you are a smart ass. “); }

else if

(Answer < 20000) { Console.WriteLine (” You are are a dumbo. “); }

else {

Console.WriteLine (” You are still a dumbo.\n If you can get the answer come back 🙂 “); }

Console.ReadKey ();

goto Start;

  • Liked by
Reply
1 on December 5, 2017

Just so you know, this is C# and not C++
And what do you mean by too simple?

on December 6, 2017

whoops my bad. Sorry I should actually close this because I found my own answer as I continue down the road of playing with c++.

Show more replies
  • Liked by
Reply
Cancel