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

#include<stdio.h>
#include<conio.h>
void main()
{
int no, i, j;
printf("ENTER THE NO:\n");
scanf("%d", &no);
printf("\nOUTPUT IS:\n");
for(i = 0; i<=no; i++)
{
for(j=0; j<=i; j++)
{
printf("%d", j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are enums in c?

663


Why & is used in scanf in c?

627


What are the loops in c?

593


Do array subscripts always start with zero?

786


Is Exception handling possible in c language?

1585






What is a list in c?

621


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1699


What is keyword with example?

642


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1856


provide an example of the Group by clause, when would you use this clause

1709


Without Computer networks, Computers will be half the use. Comment.

1877


What is calloc()?

629


a program that can input number of records and can view it again the record

1486


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

813


How do you override a defined macro?

702