lg
lg
CC#
Created by lg on 11/30/2023 in #help
how do I make a program?
using System;

namespace Interview
{
class Program
{
static void Main(string[] args)
{
string a = Console.ReadLine();
string b = Console.ReadLine();
string c = Console.ReadLine();
string d = Console.ReadLine();
string e = Console.ReadLine();
if ((e == "мука" || e == "сахар" || e == "молоко")&&(d == "мука" || d == "сахар" || d == "молоко")&&(c == "мука" || c == "сахар" || c == "молоко")&&(a == "мука" || a == "сахар" || a == "молоко")&&(b == "мука" || b == "сахар" || b == "молоко")){Console.WriteLine("YES");}

else {Console.WriteLine("NO");}
}
}
}
using System;

namespace Interview
{
class Program
{
static void Main(string[] args)
{
string a = Console.ReadLine();
string b = Console.ReadLine();
string c = Console.ReadLine();
string d = Console.ReadLine();
string e = Console.ReadLine();
if ((e == "мука" || e == "сахар" || e == "молоко")&&(d == "мука" || d == "сахар" || d == "молоко")&&(c == "мука" || c == "сахар" || c == "молоко")&&(a == "мука" || a == "сахар" || a == "молоко")&&(b == "мука" || b == "сахар" || b == "молоко")){Console.WriteLine("YES");}

else {Console.WriteLine("NO");}
}
}
}
15 replies
CC#
Created by lg on 11/30/2023 in #help
how do I make a program?
Not much
15 replies
CC#
Created by lg on 11/30/2023 in #help
how do I make a program?
Condition You have learned the recipe for a delicious cake: flour, sugar and milk. Every delicious cake should contain these three ingredients. You get 5 ingredients at the entrance, find out if the cake will be delicious or not. The input data format is 5 words – the names of the cake ingredients. Output data format The answer is YES if the cake is delicious, or NO if the cake is tasteless.
15 replies