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 functions are used for dynamic memory allocation in c language?

1079


What is static function in c?

1069


Do variables need to be initialized?

995


I heard that you have to include stdio.h before calling printf. Why?

1010


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3130


What are pointers?

1049


Do you know null pointer?

978


What are the types of c language?

981


Can we initialize extern variable in c?

1079


How can I discover how many arguments a function was actually called with?

1022


What are qualifiers in c?

987


Explain do array subscripts always start with zero?

1177


Can you mix old-style and new-style function syntax?

1053


List some applications of c programming language?

904


When should I declare a function?

1060