Предмет: Информатика, автор: MrTikva3382

Задание 1. Составить программу, которая, если введенное число отрицательное, меняет его на противоположное, если число положительное удвоить его, если число равно 0 - увеличить на 50 СРОЧНО НУЖНО ПОЖАЛУЙСТА даю 20 балов ​

Ответы

Автор ответа: lazarevilia
0

Ответ:

Друг, извини, первое условие не знаю как поставить, но зато сделал 2 других:

#include <iostream>

int setting()

{

   int x;

   

   std::cin >> x;

   

   if (x > 0)

       std::cout << x * 2 << std::endl;

   

   if (x == 0)

       std::cout << x + 50 << std::endl;;

   

   return 0;

}

int main()

{

   setting();

   return 0;

}

Объяснение:

Похожие вопросы
Предмет: Английский язык, автор: Аноним
помогите пж даю 98 баллов
1 Put the words in brackets into the Present Perfect or the Present Perfect Continuous.
1. He __________ (work) since early morning. He needs some time off.
2. ___________ (you /ever/ eat) Chinese food?
3. – Have you seen mum?
- Yes, she is at the kitchen. She _________ (cook) dinner for an hour.
4. __________ (you/clean) all morning?
5. We ____________ (not/buy) all our Christmas presents yet.
6. - ___________________(you/wash) the car all morning?
- No. I ____________(just/start).
7. - I ________________(know) Jack for three years now.
- _______________(he/study) with you for that long?
8. Oh! I______________________(cut) my finger!

2. Choose the correct word.
1. Have you ever been to/in the UK?
2. What is Jane doing? She has been to/ in the dressing room for an hour.
3. Has mum gone / been to the bakery’s?
4. Max has been to/in Moscow for 2 years now.
5. Alex has gone/been out. He will be back soon.

3. Fill in has gone to/ has been to/has been in.
1. ________ you ever ____________ such a wonderful place?
2. How long __________ you _________________Tambov now?
3. – Where is Bob? – He ______________the market several minutes ago.
4. Emma _____________ Barcelona for 5 years.
5. I ________________ St. Petersburg twice.
6.
4. Fill in a/an/the where necessary.
1. _____book that I bought yesterday is very interesting.
2. George calls me three times ____ day.
3. Sam is good at ______basketball.
4. _____Russian Federation is ____ biggest country in the world.
5. Do you speak _____English?
6. Could you give me _____apple?
7. ___Elisabeth II is ____Queen of England.
8. I have never been to ____US.
9. I found ____ kitten in the park. I took ____kitten home with me.
10. My dream is to visit ____Bolshoi Theatre.

5. Choose the correct item.
1. This dish is delicious and doesn’t take much/many time to prepare.
2. There were very little/few people at the restaurant, so it was easy for us to find a table.
3. - Is it expensive? – No, not at all. It only costs a few/a little/any pounds.
4. You shouldn’t spend many/much/a lot of money during this holidays.
5. “Do you want to have lunch with me?” –“Sure. I have a little/a few free time before my next class.”