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 is scope rule in c?
How do you print only part of a string?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What is the difference between constant pointer and constant variable?
What is mean by data types in c?
What is the use of bitwise operator?
What do the functions atoi(), itoa() and gcvt() do?
Can you please explain the difference between strcpy() and memcpy() function?
Why header files are used?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What are the characteristics of arrays in c?
Why is c still so popular?
How do you search data in a data file using random access method?
Is null equal to 0 in sql?
What does the error message "DGROUP exceeds 64K" mean?