Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hey guys i love the community you guys have here !
On to the problem i have a simple little program here it repeats using a do while loop i have a counter in the loop that should be counting and displays that value when the program is stoped.
For some reason the counter is not working what am i doing wrong here is the code.[code] #include #include #include
cnt = 0 ;
Enter a number");
Enter a next number [y] yes or no [no]");
cnt = cnt + 1; // Here is counter //
while ( repeat != 'n');
printf("You ran the program %d",cnt);