Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;

Answer Posted / pur

main()
{
int i =100;

start:
if( i == 0)
goto end;
printf(" %d ",i)
i--;
goto start;

end:
printf(" end of the program");
}

Is This Answer Correct ?    20 Yes 47 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we access array using pointer in c language?

886


Why do we use static in c?

865


Explain what is the benefit of using const for declaring constants?

814


What is the difference between text and binary modes?

905


code for replace tabs with equivalent number of blanks

1942


What is s or c?

818


What are structure members?

856


How do c compilers work?

825


What is the best style for code layout in c?

861


What is variable in c example?

843


Why does this code crash?

868


Is c# a good language?

817


What is an identifier?

839


what is the height of tree if leaf node is at level 3. please explain

1866


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

2987