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
What functions are used for dynamic memory allocation in c language?
What is static function in c?
Do variables need to be initialized?
I heard that you have to include stdio.h before calling printf. Why?
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
What are pointers?
Do you know null pointer?
What are the types of c language?
Can we initialize extern variable in c?
How can I discover how many arguments a function was actually called with?
What are qualifiers in c?
Explain do array subscripts always start with zero?
Can you mix old-style and new-style function syntax?
List some applications of c programming language?
When should I declare a function?