Тёмный
No video :(

C# hypotenuse calculator program 📐 

Bro Code
Подписаться 2,1 млн
Просмотров 21 тыс.
50% 1

C# hypotenuse right triangle calculator program tutorial example explained
#C# #hypotenuse #calc
using System;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter side A: ");
double a = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Enter side B: ");
double b = Convert.ToDouble(Console.ReadLine());
double c = Math.Sqrt((a * a) + (b * b));
Console.WriteLine("The hypotenuse is: " + c);
Console.ReadKey();
}
}
}

Опубликовано:

 

5 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@BroCodez
@BroCodez 3 года назад
using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { Console.WriteLine("Enter side A: "); double a = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter side B: "); double b = Convert.ToDouble(Console.ReadLine()); double c = Math.Sqrt((a * a) + (b * b)); Console.WriteLine("The hypotenuse is: " + c); Console.ReadKey(); } } }
@vinkame1008
@vinkame1008 Год назад
Hello from Russia! Thank you for your learning! My program: using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace Program //
@mikhailbabushkinum
@mikhailbabushkinum Год назад
Slava Rossiya
@OjiniKinlongi
@OjiniKinlongi 8 месяцев назад
I did it like this double hypotenuse = Math.Sqrt(Math.Pow(num1,2) + Math.Pow(num2,2)); Console.WriteLine(hypotenuse);
@chauphongchau5565
@chauphongchau5565 Год назад
Your mushroom cultivating techniques videos also. Many thanks.
@codemathlab
@codemathlab Год назад
Make a video about how to make a infinite runner game like temple run
@tusharbatra1526
@tusharbatra1526 Год назад
my first program, thanks.
@user-fj4gy3od7y
@user-fj4gy3od7y 11 месяцев назад
I used random numbers double a, b, c; Random rand = new Random(); a= rand.Next(4,10); b = rand.Next(4, 10); Console.WriteLine(a); Console.WriteLine(b); c = Math.Sqrt(Math.Pow(a,2) + Math.Pow(b,2)); Console.WriteLine(c); Console.ReadKey();
@spartanranger
@spartanranger 3 года назад
Thanks for the video.
@Milkshaco
@Milkshaco 3 года назад
awesome stuff
@relaxingmusicforstudying4466
@relaxingmusicforstudying4466 5 месяцев назад
I don't even know what hypotenuse is, but I guess I can calculate it now? Cool I guess
@schicktmirkarakale1232
@schicktmirkarakale1232 2 года назад
I wish I was high on potenuse
@AmirJBHope
@AmirJBHope 8 месяцев назад
GOOD!!
3 года назад
Thanks!
@wholesomeguy7086
@wholesomeguy7086 8 месяцев назад
internal class Program { static void Main(string[] args ) { Console.WriteLine("Enter the value of A"); double A = Convert.ToDouble( Console.ReadLine() ); Console.WriteLine("Enter the value of B"); double B = Convert.ToDouble( Console.ReadLine() ); double C = Math.Pow((Math.Pow(A + B, 2) - 2 * A * B), 0.5); Console.WriteLine("The value of C is " + C); Console.ReadKey(); } } }
@v4t0z
@v4t0z 2 года назад
Go brrrrr
@aditya_asundi
@aditya_asundi 3 года назад
first
@anyways4438
@anyways4438 2 года назад
Is there any good source for similar practice programs?
@WickedJackThe1
@WickedJackThe1 Год назад
"The hypotenuse is: " + c
@user-lx7xd1hc4i
@user-lx7xd1hc4i Месяц назад
Console.WriteLine("\tHypotenuse Calculator Program "); Console.WriteLine("Enter side A (Perpendicular): "); double a = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter side B (Base): "); double b = Convert.ToDouble(Console.ReadLine()); double h = Math.Sqrt(Math.Pow(a,2) + Math.Pow(b,2)); Console.WriteLine("Hypotenuse of the triangle is: " + h); Console.ReadKey();
@lawrenegummy4736
@lawrenegummy4736 2 года назад
Alternatively Console.WriteLine("Enter Side A"); double a = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Enter Side B"); double b = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Side A = Side B = "); double c = (Math.Pow(a, 2)) + (Math.Pow(b, 2)); Console.WriteLine($"The Length of Hypotenuse C is : {Math.Sqrt(c)}");
@whitedinamo
@whitedinamo 2 года назад
lesson check😇
@bobsmith1098
@bobsmith1098 Год назад
//The eagle swims fishily upstream against bytedata; pasta bottle. #RandomComment() Console.Writeline("Thanks, Bro!);
@alvaro312
@alvaro312 Год назад
// The life expectancy of a platypus is about 11 years in the wild, however, some of these mammals have lived up to 17 years in captivity. // You forgot one " " "
@boran5486
@boran5486 5 месяцев назад
I didn't understand why you used double
@testedgmo
@testedgmo 3 месяца назад
He used double because sometimes hypotenuse can be a decimal, and int values can't have decimals so he used a double instead.
Далее
C# string methods 🔤
6:52
Просмотров 37 тыс.
Programming a Tetris Game in C# - Full Guide
39:34
Просмотров 199 тыс.
C# type casting 💱
7:15
Просмотров 48 тыс.
C# interfaces 🐟
5:38
Просмотров 129 тыс.
C# if statements 🤔
6:27
Просмотров 42 тыс.
C# methods 📞
6:05
Просмотров 52 тыс.
C# enums 🪐
7:07
Просмотров 69 тыс.
C# classes 📦
4:54
Просмотров 70 тыс.
C# switches 🔀
3:07
Просмотров 56 тыс.