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

Программа которая использует цикл while и переменные счетчики найдите произведение всех четных чисел от 1 до 10
!Срочно

Ответы

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

Відповідь:

#include <iostream>

using namespace std;

int main(){

setlocale(LC_ALL, "Rus");

int counter = 1,product = 1;

while(counter < 10){

 if(counter % 2 == 0){

  product *= counter;

 }

 counter++;

}

cout << "Произведение всех четных чисел от 1 до 10 = " << product << endl;

return 0;

}

Интересные вопросы
Предмет: Английский язык, автор: stasiyak
Our journey to Greece began at six in the morning, when my family and I set off from the house in
our old car. We’d only gone a mile when we got a ____ (11) tyre, and after we’d fixed that we had
to hurry to the airport. We ____ (12) to reach the check-in just before it closed, then we went
through to the departure lounge. Soon we were ____ (13) the plane, and looking forward to
our week on an island in the sun. I had a window seat, but since I was directly above
the ____ (14) I couldn’t see much, so I asked the flight ____ (15) if I could move to another seat.
She found me one nearer the front of the plane, and later on I had a wonderful ____ (16)
of the snow-covered mountains as we crossed over the Austrian Alps. The weather became sunnier
as we approached Greece, and our plane arrived right on ____ (17) at Athens’ very smart
new airport. Half an hour after we landed, we ____ (18) the train for the centre of Athens,
where we ____ (19) trains for the port of Piraeus. It wasn’t long before we were on
the waterfront. After a short wait we were on board our ferry and sailing out to sea.
It was a lovely trip, and finally we reached our destination, the holiday was
a ____ (20) come true.

11. a flat b level c dead d broken
12. a could b managed c able d succeeded
13. a riding b flying c stepping d boarding
14. a wing b mast c platform d sail
15. a officer b helper c assistant d attendant
16. a scene b view c sight d scenery
17. a moment b hour c time d minute
18. a go into b got onto c got up d got over
19. a changed b moved c replaced d exchanged
20. a plan b hope c thought d dream
Предмет: Русский язык, автор: Аноним