Question: the do while loop will be infinite if the input is 0 why when i run the program, it still give me 0 for output?

 the do while loop will be infinite if the input is the do while loop will be infinite if the input is 0 why when i run the program, it still give me 0 for output?

#include int counting, sum, repeat; maino sum = 1; printf(" Enter one positive integer number for counting"); scanf("%d",&counting); do { sum - sumcounting; counting = counting-1; }while(counting

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!