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

Write a simple code fragment that will check if a number is positive or negative.

920


Explain can you assign a different address to an array tag?

859


Difference between constant pointer and pointer to a constant.

834


What is structure in c explain with example?

885


What is use of #include in c?

838


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2534


What is scope rule of function in c?

792


What are high level languages like C and FORTRAN also known as?

917


How can you find out how much memory is available?

817


What does it mean when the linker says that _end is undefined?

865


what is the difference between class and unio?

2114


What is printf () in c?

792


what is recursion in C

840


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1696


What is calloc()?

837