in Education by
write a C program to Read a number . find sum of digit at even position in a number and multiplication of digit at odd position in a number. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
C program Explanation: #include #include void main() { int num, i, count=0, sum=0, multi=1; printf(“Enter a number”); scanf(“%d”,&num); while(num!=0) { digi=num%10; count++; if(count/2==0) sum=sum+digi; else multi=multi*digi; num=num/10; } printf(“Sum of digit at even position in a number is %d,”,sum); printf(“Multiplication of digit at odd position in a number is %d,”,multi); }

Related questions

0 votes
    write a C program to Read a number.Find sum of digit at even position in a number and multiplication of digit ... position in a number. Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    WAP in java to check whether the sum of second and third digit of a 4 digit no. , is even or odd? Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    write a program to display and find the sum of any ten natural number. Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    write a program to display and find the sum of any ten natural number. Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    my tens digit is one more than my hundreds digit. my hundreds digit is an even number between 5 and 7. my ones ... triangle. Who am l? Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    write a program to input three integers and find the difference between their sum and difference Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    write a program to input number and print wether it is even or odd. Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    write a program to read an integer and find its reverse. note: if user enter 1234 then the output should be 4321 in Python Select the correct answer from above options...
asked Dec 2, 2021 in Education by JackTerrance
0 votes
    . Accept 8 digit number. Separate 8 digits into 4 parts. Display appropriate message in case of number with less ... again as abcd Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    write an agorithm that accepts a set of numers then calculate nd display the sum of thenuber of even vales ... this question pleasee Select the correct answer from above options...
asked Dec 11, 2021 in Education by JackTerrance
0 votes
    Algorithm To find out the sum of first 100 even numbers. (only in steps) Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    Write a c program to find largest and smallest among all elements of 2-d array. Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    Write a C program to accept an integer number between 1 and 9. Write the value of the number in words. Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    write a program in python to obtain 3 numbers and print their sum. Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
...