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...

Input any no. and print all the the numbers that comes
before it like this
for e.g input = 4
0
01
012
0123
01234
plz answer it 2day

Answer Posted / anurag

#include<iostream>
using namespace std;

int main()
{
int a=4;
for(int i=0;i<=4;i++)
{
int j=0;
while(j<=i)
{
cout<<j;
j+=1;
}
cout<<endl;
}
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope rule in c?

1074


How do you print only part of a string?

1023


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1128


What is the difference between constant pointer and constant variable?

1231


What is mean by data types in c?

1033


What is the use of bitwise operator?

1134


What do the functions atoi(), itoa() and gcvt() do?

1196


Can you please explain the difference between strcpy() and memcpy() function?

1074


Why header files are used?

1119


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1722


What are the characteristics of arrays in c?

1054


Why is c still so popular?

1050


How do you search data in a data file using random access method?

1308


Is null equal to 0 in sql?

1152


What does the error message "DGROUP exceeds 64K" mean?

1229