English, asked by kamalhegde22281, 1 year ago

Write a pseudo-code to find the sum of numbers divisible by 4.The pseudo-code must allow the user to accept a number and add it to the sum if it is divisible by 4. It should continue accepting numbers as long as the user wants to provide an input and should display the final sum in python.

Answers

Answered by Jasleen0599
13

Answer:

Step1: Start

Step2: Input the n digit numbers

Step 3: Return the sum of these n digital number which are divisible by number

Step5: Calculate the first term and the last term as

int firstnum = pow(10, n - 1);

int lastnum = pow(10, n);

Step6: Calculate the sum of n digit number and the divisible by number.

Step7: write the main function

Step8: Stop

Answered by jasminjassu1998
45

Answer:

Explanation:

step1:initially number is taken as input.

Take sum=0

Step 2:check the condition whether the number is divisible by 4 or not.

Step3:if the number is divisible by 4 then add that number to the sum

Step4:sum=sum+number

Step5:display sum.

Step6:else

Step7:do you want to go for another number

Step8:enter your choice for another number to enter.

Step9:if another number is divisible by 4

Step10:that number Wil be added to sum

Step 11:the sum is finally displayed for the number which is divisible by 4

Similar questions