Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Podaj pierwsza liczbe: ");
- int liczbapierwsza = int.Parse(Console.ReadLine());
- Console.WriteLine("Podaj druga liczbe: ");
- int liczbadruga = int.Parse(Console.ReadLine());
- Console.WriteLine("Podaj trzecia liczbe: ");
- int liczbatrzecia = int.Parse(Console.ReadLine());
- if (liczbapierwsza > 0 && liczbadruga >0 && liczbatrzecia > 0)
- {
- Console.WriteLine("TAK");
- }
- else
- {
- Console.WriteLine("NIE");
- }
- }
- }
- }
- /**
- I. Napisz, program który pobiera od użytkownika trzy liczby typu int i sprawdza czy wszystkie są
- większe od 0. Schemat programu:
- Podaj pierwszą liczbę: 1
- Podaj drugą liczbę: 4
- Podaj trzecią liczbę: 77
- TAK
- Wywołanie alternatywne:
- Podaj pierwszą liczbę: -5
- Podaj drugą liczbę: 2
- Podaj trzecią liczbę: 11
- NIE
- Wskazówki: Console.Write, int.Parse, Console.ReadLine, if, Console.WriteLine
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement