Please kindly assist to look at the reason why the value of the triangle is not 15 but it is 0 in this my codes. Thank you. Gbenga Olanipekun
class Program
{
static void Main(string[] args)
{
// int a =3 + 6;
// int b = 5 -7;
// int a;
// a =3 + 6;
// b =5 + 7;
// int a = 6
// b =c +5;
// v = b -j ;
// double moneymadefromgames = 100000;
// double totalprogrammers = 4;
// double moneyperperson = moneymadefromgames / totalprogrammers;
// the formular for area of circle is pi * r ^ 2;
// the formular for area of triagle is 1/2 b * h;
float b = 5;
float height = 6;
double area = 1/2 *b * height;
Console.WriteLine("the areas of triagle is " + area);
int score;
int age;
age = -89;
score = 33;
int loan;
int credit;
float radius = 4;
float pi = 3.1415926536f; // the 'f' makes it a float literal instead of a double literal.
float newarea = pi * radius * radius;
// using the + operator with strings results in "concatenation".
Console.WriteLine("The area of the circle is " + newarea + ".");
loan = 2000;
credit = 5000;
float totalcost = 22.54F;
float tipPercent = 0.18F;
float tipAmount = totalcost * tipPercent;
double moneymadefromgames = 100000;
double totalprogrammers = 4;
double moneyperperson = moneymadefromgames / totalprogrammers;
System.Console.WriteLine(moneyperperson);
System.Console.WriteLine(score - age);
System.Console.WriteLine("PRESS ANY key to exit");
System.Console.WriteLine(loan + credit);
System.Console.WriteLine(tipAmount);
System.Console.Read();
}
}