#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# BRACKEYS - Solution to C# Tutorial 02 Challenge

• heres mine

using System;

namespace variables

{

class Program

{

static void Main(string[] args)

{

Console.BackgroundColor = ConsoleColor.Black;

Console.ForegroundColor = ConsoleColor.DarkGreen;

double num_1;

double num_2;

double num_3;

Console.Write("Averageinator 2000, select your 1st number: ");

num_1 = Convert.ToDouble( Console.ReadLine() );

Console.Write("insert your second number: ");

num_2 = Convert.ToDouble( Console.ReadLine() );

Console.Write("insert the third and final number: ");

num_3 = Convert.ToDouble( Console.ReadLine() );

double result = num_1 + num_2 + num_3 / 3;

Console.WriteLine("The Average is " + result);

// wait before closing

}

}

}

• edited September 2020

• I did it ;DDD

using System;

namespace Best_Program

{

class Program

{

static void Main(string[] args)

{

double num01;

double num02;

double num03;

Console.WriteLine ("Input a number: ");

Console.WriteLine ("Input a second number: ");

Console.WriteLine ("Input a third number: ");

double avarage = (num01 + num02 + num03) / 3;

Console.WriteLine("The avarage of these numbers is " + avarage);

// average = (x + y + z) / 3

}

}

}

😪

• ```using System;

namespace apprentissage_c__challenge_2
{
class Program
{
static void Main(string[] args)
{
// all variables

double num01;
double num02;
double num03;
double sum;
double finalResult;

// the code for the program

Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.BackgroundColor = ConsoleColor.White;
Console.WindowHeight = 35;
Console.Title = "challenge number 02";

Console.WriteLine("hello, i'm going to calculate the average of the three numbers you put in");

Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.BackgroundColor = ConsoleColor.White;

Console.WriteLine("give me the first number, please.");

Console.ForegroundColor = ConsoleColor.White;
Console.BackgroundColor = ConsoleColor.Black;

num01 = Convert.ToDouble ( Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.BackgroundColor = ConsoleColor.White;

Console.WriteLine("give me the second number, please.");

Console.ForegroundColor = ConsoleColor.White;
Console.BackgroundColor = ConsoleColor.Black;

num02 = Convert.ToDouble ( Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.BackgroundColor = ConsoleColor.White;

Console.WriteLine("give me the last one now, please.");

Console.ForegroundColor = ConsoleColor.White;
Console.BackgroundColor = ConsoleColor.Black;

num03 = Convert.ToDouble ( Console.ReadLine() );

sum = ( num01 + num02 + num03 );

finalResult = sum / 3;

Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.BackgroundColor = ConsoleColor.White;

Console.WriteLine("the result is: " + finalResult + " ,have a nice day");

}
}
}

```
• ```using System;

namespace Challenge_2
{
class Program
{
static void Main(string[] args)
{
float num01;
float num02;
float num03;

Console.Write("Input a number: ");
num01 = Convert.ToSingle( Console.ReadLine() );

Console.Write("Input a second number: ");
num02 = Convert.ToSingle( Console.ReadLine() );

Console.Write("Input a third number: ");
num03 = Convert.ToSingle( Console.ReadLine( ) );

float result = (num01 + num02 + num03) / 3;
Console.WriteLine("The result is " + result);

//wait before closing it

}
}
}
```
• This is mine 😅

using System;

namespace Learning_to_code_C_

{

class Program

{

static void Main(string[] args)

{

double num01;

double num02;

double num03;

Console.Write("Insert a number: ");

num01 = Convert.ToDouble( Console.ReadLine() );

Console.Write("Insert a second number: ");

num02 = Convert.ToDouble( Console.ReadLine() );

Console.Write("Insert a third number: ");

num03 = Convert.ToDouble( Console.ReadLine() );

double FirstStep = num01 + num02 + num03;

Console.WriteLine("The answer is " + FirstStep / 3 );

}

}

}

• using System;

namespace Test

{

class Program

{

static void Main(string[] args)

{

Console.Title = ("Test");

Console.ForegroundColor = ConsoleColor.Green;

Console.WindowHeight = (30);

double num1;

double num2;

double num3;

Console.WriteLine("ghi Mot so bat ki:");

num1 = Convert.ToDouble( Console.ReadLine() );

Console.WriteLine("Ghi mot so bat ki lan nua:");

num2 = Convert.ToDouble( Console.ReadLine() );

Console.WriteLine("Ghi mot so bat ki lan nua nua:");

num3 = Convert.ToDouble( Console.ReadLine() );

double Dap_an = (num1 + num2 + num3) / 3;

Console.WriteLine("Dap An La: " + Dap_an);

}

}

}

i did it

• using System;

namespace _4

{

class Program

{

static void Main(string[] args)

{

Console.Title = "Variables.test";

Console.ForegroundColor = ConsoleColor.Yellow;

Console.WindowHeight = 20;

double num01;

double num02;

double num03;

Console.Write("Input a number: ");

Console.Write("Input second number ");

Console.Write("Input Third number ");

double result = (num01 + num02 + num03) /3;

Console.WriteLine("The average of these numbers is " + result + "\nPress any key to exit.");

}

}

}

• Wanted To Save On Desirable 24-Hour Ac Repair Atlanta Service? Call Us Now!

If you wanted to save desired amount on the HVAC Repair In Georgia then you need to connect with us instantly as we provides the best and quick heating & air conditioning solutions with in pocket friendly rates. We are proud to offer you the easily customizable services as we have the genuine experience and only work to deliver you the unmatchable support and satisfacction. All our Air Conditioning Repair Atlanta technicians have the equipment’s which are reliable and used to enhance the performance and resolve issues of your HVAC systems. Additionally we provide solutions round the clock as our professional technicians are present on even in the odd hours at our helpdesk.

Some of our Air Conditioning Repair Atlanta benefits you get when you out to us:

·        24*7 operational helpdesk.

·        Certified and licensed technicians.

·        Upfront charges,

·        Same day inspections.

Hvac Repair In Georgia

• Services Which Make Trusted Captain- Best HVAC Companies In Columbus Ohio?

There are various components placed in your HVAC systems and when these components get affected they indirectly affect your peace of mind as you are unable to get the perfect comfort & temperature at your home or office. When you dial our Columbus Heating And Cooling helpdesk number we diagnose, inspect and then repair your installed HVAC systems with utmost care & cost-effective approach. We have the best suited 24*7 operational helpline number for both commercial & residential individuals as emergencies can arise anytime and getting them resolved in mandatory.

Some of our services are listed which make us prominent HVAC Companies Columbus Ohio:

·        Ducted or ductless HVAC systems installation & repairs.

·        Thermostats repairing & installations.

·        Installation & tune-ups of furnaces & boilers.

·        Ventilation systems repairing, installations.

·        And many more.

HVAC replacement ohio

hvac dayton ohio

heating and air dayton ohio heating and cooling columbus ohio

• Air Conditioning Repair Near Me Services You Can Expect From Us Round The Clock!

HVAC systems have some vulnerable parts which need to be work perfectly as if they are not then they can directly affect life & performance of your HVAC systems. If you already wasted your time in searching for the HVAC Replacement Near Me services then don’t get tensed make a call on our helpline number and we offer you the most amazing services at your desired place quickly.

For your reference we mentioned some of our services:

·        Installation & maintenance of furnaces & thermostats.

·        Heating systems installations.

·        Air quality inspection & ventilation installation services.

·        Air conditioning systems installations & maintenance.

·        And much more.

Best HVAC Companies In NJ

• Why You Need To Dial Our Helpline Number Rather Than Searching For The HVAC Repair Services Near Me?

As a trusted name in offering the most affordable heating and cooling solutions whether for your commercial or residential systems we have the genuine, reliable and cost-oriented services. Our experts are consistently chosen by most of the home or business owners as apart from repairing we also proficient in delivering the most genuine maintenance and installation services as well. So don’t waste your time internet by searching for the HVAC Repair Services Near Me just pick up your phone and speak to our experts to get the exceptional services quickly.

air conditioning repair near me

• There's no activity in this forum but here's my solution OwO

//Calculator

double num01;

double num02;

double num03;

Console.ForegroundColor = ConsoleColor.Green;

Console.WriteLine("Mini Average Calculator");

Console.ForegroundColor = ConsoleColor.Cyan;

Console.Write("Input a number: ");

Console.Write("Input another number: ");

Console.Write("Input yet another number: ");

double result = (num01 + num02 + num03) / 3;

Console.WriteLine("Result returned when numbers are averaged = " + result);

• Here is mine:

using System;

namespace Project1

{

class Program

{

static void Main(string[] args)

{

Console.Write("Input a number ");

double num1 = Convert.ToDouble (Console.ReadLine());

Console.Write("Input second number: ");

double num2 = Convert.ToDouble (Console.ReadLine());

Console.Write("Input third number: ");

double num3 = Convert.ToDouble (Console.ReadLine());

Console.Write("The result is: " +((num1+num2+num3)/3));

}

}

}

• using System;

namespace c__code

{

class Program

{

static void Main(string[] args)

{

double num01;

double num02;

double num03;

Console.Title = "Average";

Console.WriteLine("Enter The First Num01");

Console.WriteLine("Enter The First Num02");

Console.WriteLine("Enter The First Num03");

double result = ((num01 + num02 + num03) / 3);

Console.ForegroundColor = ConsoleColor.DarkMagenta;

Console.WriteLine("The Average of Three Numbers Is" + result);

}

}

}

• So at first i got it wrong because I didn't insert brackets, but then i re watched the video and came up with this:

using System;

namespace find_Average_out_of_3

{

class Program

{

static void Main(string[] args)

{

Console.Title = "Average calculator(out of 3)";

double num01;

double num02;

double num03;

Console.Write("Put in a first number: ");

Console.Write("Put in a second number: ");

Console.Write("Put in a third number to find the average: ");

double average = (num01 + num02 + num03)/3;

Console.WriteLine("The average is: " +average);

}

}

}

• using System;

namespace amazing_cool_thing_do_not_peek

{

class Program

{

static void Main(string[] args)

{

double num01;

double num02;

double num03;

Console.ForegroundColor = ConsoleColor.DarkGreen;

Console.Write("Input a number.");

num01 = Convert.ToDouble( Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.DarkGreen;

Console.Write("Input a second number.");

num02 = Convert.ToDouble( Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.DarkGreen;

Console.Write("Now finally, input a final number.");

num03 = Convert.ToDouble( Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.DarkGreen;

double addition = num01 + num02 + num01;

double result = addition / 3;

Console.ForegroundColor = ConsoleColor.DarkGreen;

Console.WriteLine("The average is " + result );

}

}

}

• edited April 2021

Heres my solution!

{

// gets vars

int x;

int y;

int z;

//Get Numbers

Console.Write("Input a number so i can calculate the average: ");

Console.Write("Input a second number so i can calculate the average: ");

Console.Write("Input a third number so i can calculate the average: ");

// final calculation

int result = (x + y + z) / 3;

Console.WriteLine("The average of those 3 numbers is " + result);

// Wait before closing

}

}

}

The file incase somebody needs it:

• using System;

namespace lil_nigs_program

{

class Program

{

static void Main(string[] args)

{

// Declare variables

double num01;

double num02;

double num03;

//Get first Number

Console.Write("Input a number: ");

//Get second Number

Console.Write("Input second number: ");

//Get Third Number

Console.Write("Input third Number: ");

// Calculate and Display The average

double result = (num01 + num02 + num03) / 3;

Console.WriteLine("The average of These number is " + result);

// Wait before closing

}

}

}

• Assignment2:

```using System;

namespace C__Assignment2
{
class Program
{
static void Main(string[] args)
{
//Creating Variables
int num01, num02, num03, average;
//Editing Console title
Console.Title = "Average-inator";
//Changing Text Color
Console.ForegroundColor = ConsoleColor.Magenta;

//Taking inputs for variables
Console.Write("Enter the first number: ");
num01 = Convert.ToInt32( Console.ReadLine() );
Console.Write("Enter the second number: ");
num02 = Convert.ToInt32( Console.ReadLine() );
Console.Write("Enter the third number: ");
num03 = Convert.ToInt32( Console.ReadLine() );

//Calculating average
average = (num01 + num02 + num03) / 3;
Console.WriteLine("The Average of 3 Numbers is: " + average);

//Wait before closing
}
}
}

```
• ```using System;

namespace My_Awesome_Program
{
class Program
{
static void Main(string[] args)
{
double num1;
double num2;
double num3;
double avgResult;

Console.WriteLine("Whats your first number?");
Console.WriteLine("Whats the number you would like to add to the first?");
Console.WriteLine("Whats another number you would like to add to the first?");
avgResult = (num1+num2+num3)/3;
Console.WriteLine("Your average is : " + avgResult);

}
}
}
```
• I did this

using System;

namespace Programs

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine("Input a number");

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

Console.WriteLine("Input a second number");

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

Console.WriteLine ("Input a last number");

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

var result = number01 + number02 + number03 /3;

Console.WriteLine ("The average is" + result);

}

}

}

• This is my resolution

using System;

namespace Code

{

class Program

{

static void Main(string[] args)

{

//variables

double num01;

double num02;

double num03;

//customization

Console.ForegroundColor = ConsoleColor.DarkCyan;

//process

Console.Write("Input the first number\n");

Console.Write("Input the second number\n");

Console.Write("Input the third number\n");

//final

Double answer = (num01 + num02 + num03) / 3;

//result

Console.Write("The average is "+ answer);

}

}

}

• Hi there

Why can i not use

var num01;

does someone know?🐋

• edited August 2021

I'm a beginner, but I tried my best.

Code:

using System;

namespace Programming_Lesson_2

{

class Program

{

static void Main(string[] args)

{

double num01;

double num02;

double num03;

double totalNumbers = 3;

Console.Write("Input a number: ");

num01 = Convert.ToDouble( Console.ReadLine());

Console.Write("Input a second number: ");

num02 = Convert.ToDouble( Console.ReadLine());

Console.Write("Input a third number: ");

num03 = Convert.ToDouble( Console.ReadLine());

double result = (num01 + num02 + num03) / totalNumbers;

Console.WriteLine("The result is " + result);

}

}

}

• using System;

namespace Variables

{

class Program

{

static void Main(string[] args)

{

//Declare Variables//

double num01;

double num02;

double num03;

//TEST//

Console.ForegroundColor = ConsoleColor.Red;

Console.Write("Input your First Number: ");

num01 = Convert.ToDouble(Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.Green;

Console.Write("Input your Second Number: ");

num02 = Convert.ToDouble(Console.ReadLine() );

Console.ForegroundColor = ConsoleColor.White;

Console.Write("Input your Third Number: ");

num03 = Convert.ToDouble(Console.ReadLine() );

double result;

result = num01 + num02 + num03 / 3;

Console.WriteLine("Final Result is: " +result);

//Wait before Closing//

}

}

}

That's my Code Guys i did my best i know it's almost the same but i hope it's good :)

• My Solution to Challenge 2:

using System;

namespace yeet_le_program

{

class challenge2

{

static void Main(string[] args)

{

double x;

double y;

double z;

Console.Write("Enter a number: ");

Console.Write("Input a second number: ");

Console.Write("Input a third number: ");

double a = (x+y+z)/3;

Console.WriteLine("Average of these 3 thumbers is: "+a);

}

}

}

• ```using System;
using System.Collections.Generic;
using System.Linq;

namespace MyApp // Note: actual namespace depends on the project name.
{
public class Program
{
public static void Main(string[] args)
{
// Title
Console.Title = "Average of 3 numbers";

// Declaring variables
double num1;
double num2;
double num3;
double result;

// First number
Console.Write("Input the first number: ");
num1 = Convert.ToDouble( Console.ReadLine() );

// Second number
Console.Write("Input the second number: ");
num2 = Convert.ToDouble( Console.ReadLine() );

// Third number
Console.Write("Input the third number: ");
num3 = Convert.ToDouble( Console.ReadLine() );

// Result
result = (num1 + num2 + num3) / 3;
Console.WriteLine("The average of the 3 numbers is " + result);

// Wait for input
}
}
}
```
• using System;

namespace Code_Relearn_Camp

{

class Program

{

static void Main(string[] args)

{

double num1;

double num2;

double num3;

Console.Write(" Input a number: ");

Console.Write("Input a second number: ");

Console.Write("Input a third number ");

double sol = (num1 + num2 + num3) / 3;

Console.WriteLine("The average of the three absolutely chad like number you put in is " + sol);