geno
geno
CC#
Created by geno on 10/20/2023 in #help
✅ i dont know how to install the .vscode files
how do install the launch.json and task.json files?
23 replies
CC#
Created by geno on 10/7/2023 in #help
✅ my code to calculate an average seems to be wrong
using System;
using System.Reflection.Metadata;

namespace startover
{
internal class Program
{
static void Main(string[] args)
{
//window setting
Console.Title = "window name";
Console.ForegroundColor = ConsoleColor.Green;
Console.WindowHeight = 40;
//main part of program
int x;
int y;
int z;


Console.Write("whats x? ");
x = Convert.ToInt32( Console.ReadLine());

Console.Write("whats y? ");
y = Convert.ToInt32( Console.ReadLine());

Console.Write("whats z? ");
z = Convert.ToInt32( Console.ReadLine());

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



Console.ReadKey();
}
}
}
using System;
using System.Reflection.Metadata;

namespace startover
{
internal class Program
{
static void Main(string[] args)
{
//window setting
Console.Title = "window name";
Console.ForegroundColor = ConsoleColor.Green;
Console.WindowHeight = 40;
//main part of program
int x;
int y;
int z;


Console.Write("whats x? ");
x = Convert.ToInt32( Console.ReadLine());

Console.Write("whats y? ");
y = Convert.ToInt32( Console.ReadLine());

Console.Write("whats z? ");
z = Convert.ToInt32( Console.ReadLine());

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



Console.ReadKey();
}
}
}
when i plug in 100 for the three values i get 233
21 replies