• Составить программу на C - Найти произведение n чисел. n также вводить с клавиатуры. Результат вывести на экран

Ответы 1

  • #include "stdio.h"

    #include "stdlib.h"

    using namespace std;

    int main(){

    int n;

    int enter_number;

    int result = 1;

    printf("Enter amount of number: "); scanf("%d", &n);

    for(int i = 0 ; i < n; i++){

     printf("Enter number: "); scanf("%d", &enter_number);

     result = result * enter_number;

    }

    printf("result: %d", result);

    system("pause");

    return 0;

    }

  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years