Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = 10;
- bool modul=Number(number);
- // int rezult2 = modul == true ? 1 : 0;
- int nomber2 = 100;
- string rezult2 = Number2(nomber2);
- // string rezult = Number2(rezult2);
- }
- public static bool Number(int number)
- {
- bool rezult = number >= 0 ? true : false;
- return rezult;
- }
- public static string Number2 (int nomber2)
- {
- string rezult2;
- return rezult2 = nomber2 >=0 ? "Число положительное или 0" : "Число отрицательное";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement