Search
 
SCRIPT & CODE EXAMPLE
 

C

c program for calculating product of array

//Product of integers in an array

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a[1000],i,sum=1,n;

    printf("Enter the size of array: ");
    scanf("%d", &n);

    printf("Enter the items in the array: ");
    for (i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }

    for(i = 0; i < n; i++)
    {
        sum *= a[i];
    }
    printf("The product of your array is %d", sum);
}
Comment

PREVIOUS NEXT
Code Example
C :: c get int inpot 
C :: Highest integer among the four inputs in c 
C :: Syntax for creating a node 
C :: how to change the smartart style to 3D polished in powerpoint 
C :: how to do Employing defensive code in the UI to ensure that the current frame is the most top level window 
C :: retoure a la ligne C 
C :: get string from ptrace registery 
C :: c to assembly online compiler 
C :: insertNode 
C :: c program to pass a single element in an funtional array 
C :: c enums 
C :: code_art_bcm_10.c 
C :: What keyword covers unhandled possibilities? 
C :: c to assembly converter online 
C :: c disable struct padding 
C :: Reverse every Word of given String 
C :: google sheets transpose new line to table 
C :: add last in list c 
C :: what to do after autoencoder training 
C :: Laravel installation on Linux 
C :: float and double Output 
C :: online c compiler with mpi 
C :: wordpress clean name spaces 
C :: vs code turn off formatter 
C :: c get string 
Dart :: debug banner flutter 
Dart :: rel canonical tag 
Dart :: flutter listtile leading and title space 
Dart :: flutter close app programmatically 
Dart :: flutter types class enum 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =