double radius;
double height;
double ans;
Console.WriteLine("what is the radius ");
radius = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("what is the height ");
height = Convert.ToDouble(Console.ReadLine());
ans = radius * radius * 3.14 * height ;
Console.WriteLine("your volume is " + ans );
}
}
using System;
using System.Collections.Generic;
namespace App
{
class Program
{
static void Main(string[] args)
{
double radius;
double height;
double ans;
Console.WriteLine("What is the radius: ");
radius = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("What is the height: ");
height = Convert.ToDouble(Console.ReadLine());
ans = radius * radius * 3.14 * height;
Console.WriteLine("Your volume is " + ans);
Console.ReadLine();
}
}
}
Comments
Leave a comment