// Zadanie rozgrzewkowe using System; namespace ConsoleApp1 { class Program { static void Main(string[] args) { Console.WriteLine("Podaj pojemność podaną na dysku w GiB"); int size_on_disk = int.Parse(Console.ReadLine()); double disk_size_trully = (size_on_disk * Math.Pow(1000, 3)) / Math.Pow(1024, 3); Console.WriteLine($"Faktyczna pojemność dysku to około: " + $"{Math.Round(disk_size_trully, 2)} GB"); } } } // Windows Form App (.NET Framework) // do okna należy dodać 2 label'y, 2 textBox'y oraz 1 przycisk using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btn_calculate_Click(object sender, EventArgs e) { double internet_speed_Mb = double.Parse(txt_input.Text); double internet_speed_MB = internet_speed_Mb / 8; txt_output.Text = internet_speed_MB.ToString(); } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btn_calculate_Click(object sender, EventArgs e) { int computer_count = int.Parse(txt_input.Text); int student_count = int.Parse(txt_student_input.Text); double computer_per_student = (double)computer_count / student_count; txt_result.Text = computer_per_student.ToString(); } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btn_calculate_Click(object sender, EventArgs e) { /* * Średniej wielkości banan waży około 220 gram. * Napisz program przeliczający, ilu bananom odpowiada masa podanego przedmiotu. */ int weight = int.Parse(txt_input.Text); double bananas = (double)weight / 0.22; txt_result.Text = bananas.ToString(); } } }