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

For15 c++
Дано вещественное число A и целое число N (> 0). Вывести A в степени N: An = A•A•...•A (числа A перемножаются N раз)

Ответы

Автор ответа: BobbyFresnel
2

#include <iostream>

using namespace std;

int main()

{

   int n;

   double a;

   cin >> a >> n;

   double p = a;

   for(int i = 2; i <= n; i++)

       p *= a;

   cout << p;

   return 0;

}

Похожие вопросы
Предмет: Английский язык, автор: burdenkoartem90
помогите пожалуйста решить кр по англ.яз
1. Fill in strapped, addicted, technical, physical, opposing, half-time, enthusiasm, tournament,

3 words are extra

1. Jane does very well in this year’s regional tennis ________.

2. We defeated the _________ team four-nil.

3. Thousands of fans showed great ________ when “Avangard” won the match.

4. His ________ knowledge of computers helps him to analyse complex sport statistics.

5. She is in a very good _____form.

2. Match the words. Complete the sentences with the correct compound nouns.

grey lasting

hard looking

good built

newly haired

long working

Miss Marple was an elderly _______ lady.

You should be more _______ or you’ll never pass your exams.

It’s not surprising that she works as a model – she is so _______!

I haven’t seen this house before, is it _______?

School friendship can be a very _______ thing.

3. Conditionals. Fill in the gaps with the correct form of the verb in brackets.

1. If I ____ (be) not busy, I’ll visit her.

2. If he ____ (be) attentive, he wouldn’t break things.

3. If he had had trainers he _____ (play) football.

4. If you _____ (have) free time, you would go sandboarding.

5. If you don’t give me more time, I ____ (can) complete the test.

4. Fill in the correct particles (up, to, after, off).

1. She takes ____ her mum, she’s also very serious.

2. Take _____ your coat, it’s all wet!

3. The new baby sitter was very kind and children soon took ____ her.

4. Preparation to exams takes _____ almost all my free time.

5. He likes sport; he takes ______ his father.

5. Fill in the correct prepositions.

1. In that sport centre you can get the equipment ____hire.

2. Who is _____charge of this competition?

3. They have never been ___favour of these strict rules.

4. After the repairing our gym is