https://www.devskill.com/CodingProblems/ViewProblem/14
using System;
public class Exercise8
{
public static void Main()
{
int T=Convert.ToInt32(Console.ReadLine());
for(int i=0;i<T;i++){
string s=Console.ReadLine();
string[] values=s.Split(' ');
double a=double.Parse(values[0]);
double b=double.Parse(values[1]);
double c=double.Parse(values[2]);
double r=(a*a)+(b*b)+(c*c);
double ans=Math.Pow(r,0.5);
Console.WriteLine(ans.ToString("0.00"));
}
}
}
using System;
public class Exercise8
{
public static void Main()
{
int T=Convert.ToInt32(Console.ReadLine());
for(int i=0;i<T;i++){
string s=Console.ReadLine();
string[] values=s.Split(' ');
double a=double.Parse(values[0]);
double b=double.Parse(values[1]);
double c=double.Parse(values[2]);
double r=(a*a)+(b*b)+(c*c);
double ans=Math.Pow(r,0.5);
Console.WriteLine(ans.ToString("0.00"));
}
}
}
No comments:
Post a Comment