Объяснение:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace example
{
class Program
{
static void Main(string[] args)
{
int x, answer1, answer2;
Console.Write("Введите x : ");
x = int.Parse(Console.ReadLine());
answer1 = 2*x+3*Convert.ToInt32(Math.Pow(x,2))-4*Convert.ToInt32(Math.Pow(x,3));
answer2 = 1+2*x+3*Convert.ToInt32(Math.Pow(x,2))+4*Convert.ToInt32(Math.Pow(x,3));
Console.WriteLine("Значение первого выражения : " + answer1);
Console.WriteLine("Значение второго выражения : " + answer2);
Console.ReadLine();
}
}
}
1)
a = 1
b = 3*1 = 3
x = (1+3)/(1*3-1) = 4/(3-1) = 4/2 = 2
2)
#include <iostream>
using namespace std;
signed main() {
string name;
cin >> name;
cout << "Здравствуй, " << name << "! Давай дружить?";
}
3)
#include <iostream>
using namespace std;
signed main() {
int a,b,c;
cin >> a >> b >> c;
if(a == b || b == c || a == c)
cout << "YES";
else
cout << "NO";
}
4)
#include <iostream>
using namespace std;
signed main() {
int sum = 0;
while(true){
int x;
cin >> x;
if(x == 0)
break;
sum += x;
}
cout << sum;
}