Skip to content

Instantly share code, notes, and snippets.

using System;
//Write a program that reads 3 numbers: an integer a (0 ≤ a ≤ 500),
//a floating-point b and a floating-point c and prints them in 4 virtual columns on the console.
//Each column should have a width of 10 characters. The number a should be printed in hexadecimal,
//left aligned; then the number a should be printed in binary form, padded with zeroes,
//then the number b should be printed with 2 digits after the decimal point, right aligned;
//the number c should be printed with 3 digits after the decimal point, left aligned.
//Examples:
//a b c result
using System;
//Write a program that gets two numbers from the console and prints the greater of them. Try to implement this without if statements. Examples:
//a b greater
//5 6 6
//10 5 10
class NumberComparer
{
static void Main()
using System;
//A company has name, address, phone number, fax number, web site and manager.
//The manager has first name, last name, age and a phone number.
//Write a program that reads the information about a company
//and its manager and prints it back on the console.
class PrintCompanyInformation
{
static void Main()
{
using System;
//Write a program that reads the radius r of a circle and prints its
//perimeter and area formatted with 2 digits after the decimal point.
//Examples:
//r perimeter area
//2 12.57 12.57
//3.5 21.99 38.48
class CirclePerimeterAndArea