Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

This code is suppose to take up to 10 numbers and multiply them together and give the user the product but what is wrong with it?

This code is suppose to take up to 10 numbers and multiply them together

  • and give the user the product but what is wrong with it?9τ

    #include <stdio.h>
    int main()
    {
    int array[10], i, n, product=1;
    printf(“How many whole numbers do you wish to calculate (up to ten)?: “);
    scanf(“%d”, &n);
    if (n>10)
    {printf(“%d is greater than 10 please run program again”,n); }
    if (n<=10)
    {
    printf(“\nEnter the %d numbers you wish to multiply:\n “,n);
    for (i = 1; i <n; i++)
    {
    scanf(“%d”, &array[i]);
    product = product * array[i];
    }
    printf(“\nThe product of the %d numbers you entered are equal to %d\n”,n, product);
    return 0;
    }
    }

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"