#include<stdio.h>
OUTPUT:
Enter upto 5 Values: 2 3 5 4 7 Total Sum of Odd values is: 15
#include<stdio.h>
main()
{
    int a[10],i,sum=0;
    printf("Enter upto 5 Values: ");
    for(i=0; i<5; i++)
        scanf("%d",&a[i]);
    for(i=0; i<5; i++)
    {
        if(a[i]%2==1)
            sum=sum+a[i];
    }
    printf("Total Sum of Odd values is: %d ",sum);
   
}OUTPUT:
Enter upto 5 Values: 2 3 5 4 7 Total Sum of Odd values is: 15
PDF Download Links University Question Papers Notes Laboratory Manual Record Important Questions and Question Bank Important Questions Pro...
No comments:
Post a Comment