Answer to Question #307568 in C# for kun

Question #307568

Write a program that asks a user for an IQ score. If the score is a number less than 0 or greater


than 200, issue an error message. Otherwise issue a message according to the following values:



Under 100 Below average


100 Average


Above 100 Above average

1
Expert's answer
2022-03-07T18:04:22-0500
using System;

namespace IQCalculator

{
    class Program
    {
        static void Main(string[] args)
        {
            int IQ = -1;
            Console.WriteLine("Enter your IQ level");
            IQ = int.Parse(Console.ReadLine());
            if (IQ < 0 || IQ > 200)
                Console.WriteLine("Check if the data is correct");
            if (IQ > 0 && IQ < 100)
                Console.WriteLine("Below the average");
            if (IQ == 100)
                Console.WriteLine("Middle");
            if (IQ > 100 && IQ < 200)
                Console.WriteLine("Above the average");
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS