Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / govind

#include<conio.h>
#include<stdio.h>
void main()
{
int i;
clrscr();
printf("\n the value of the 100 to 0 \n");
for(i=100;i>0;i--)
{
if(i==0)
{
goto start;
}
printf(" %d\t",i);
}

printf("\nthe value of the 0 to 100 \n ");
start:
if(i==100)
{
goto end;
}
printf("%d\t",i);
i++;
goto start;
end :
printf("End of the program");
getch();
}

Is This Answer Correct ?    6 Yes 67 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by type specifiers?

1082


Explain the process of converting a Tree into a Binary Tree.

2607


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1011


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1741


how to introdu5ce my self in serco

1938


What is a void * in c?

1021


What is "Hungarian Notation"?

1033


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1013


hi, which software companys will take,if d candidate's % is jst 55%?

2047


Distinguish between actual and formal arguments.

1013


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1011


What is a example of a variable?

949


What is a null string in c?

988


What are shell structures used for?

984


What are the basic data types associated with c?

1220