Array Addition by float integers || BCA THERAPY

INPUTS


 // Array Addition by float integers //


#include<stdio.h>

 main()

{

int n,i;

float sum=0;

printf("Enter the array\t");

scanf(" %d",&n);

float arr[n];

printf("enter the array elements\t");

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

{

scanf("%f",&arr[i]);

sum=sum+arr[i];

}

printf("The addition of the array is %.1f\n",sum);

}



OUT PUT






Comments

Popular posts from this blog

Array Descending Order || BCA THERAPY