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
What are enums in c?
Why & is used in scanf in c?
What are the loops in c?
Do array subscripts always start with zero?
Is Exception handling possible in c language?
What is a list in c?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
What is keyword with example?
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.
provide an example of the Group by clause, when would you use this clause
Without Computer networks, Computers will be half the use. Comment.
What is calloc()?
a program that can input number of records and can view it again the record
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
How do you override a defined macro?