I am currently in a C# boot camp. I am having trouble putting this together. The assignment is to create a console app for an insurance company that asks three questions.
- Age, which must be greater than 15,
- any speeding tickets, must be 3 or less, and
- DUI's, which must be answered "false". Then
- Qualified? with an answer of true / false.
I'm technically not supposed to use "if" statements in the code since we haven't covered "if" statements in the C# course yet so it should be a basic equation to check all 3 user inputs to print out one answer of true/false. I am having issues putting the equation together at the end that checks all three and outputs a true/false answer. This is my first post on here, so, my apologies if I'm not giving the proper info. Any help would be appreciated.
namespace BooleanLogic
{
class Program
{
static void Main(string[] args)
{
int age = 15, speed = 3;
bool DUI = false;
Console.WriteLine("Welcome to TTA Car Insurance. \nYou will be asked a few questions to determine if you qualify. \n");
Console.WriteLine("What is your age?");
age = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Have you ever had a DUI? \nPlease enter true or false.");
DUI = Convert.ToBoolean(Console.ReadLine());
Console.WriteLine("How many speeding tickets do you have?");
speed = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Qualified?");
Console.ReadLine();
}
}
}