BOOLEAN.19
Jumlani rostlikka tekshiring. “Berilgan uchta butun sonlarning hech bo’lmagandabir jufti o’zaro qarama-qarshi “
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
int a,b,c,m=0,n=0;
Console.WriteLine("kiritilgan sonlardan hech bo'lmasa bitta juftlik turli ishorali");
Console.WriteLine("a=");
a=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("b=");
b=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("c=");
c=Convert.ToInt32(Console.ReadLine());
if(a>0) m++;
else if (a<0) n++;
if(b>0) m++;
else if (b<0) n++;
if(c>0) m++;
else if (c<0) n++;
if((m>=1)) && ((n>=1))
Console.WriteLine("Mulohaza rost");
Console.WriteLine("Mulohaza yolg'on");
Console.ReadKey();
}
}
}
Do'stlaringiz bilan baham: |