Answer Posted / nayan soni
#include <stdio.h>
#include <conio.h>
void main()
{
int count = 1;
for(int i = 1;i <= 3;i++)
{
for(int j = 1;j <= i;j++)
{
printf("%d ", count);
count++;
}
printf("\n");
}
getch();
}
It works perfectly.. Tested by running the program..
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is a program flowchart?
Is there anything like an ifdef for typedefs?
With the help of using classes, write a program to add two numbers.
What is omp_num_threads?
What is a stream in c programming?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
How is pointer initialized in c?
How do you list files in a directory?
shorting algorithmS
What is 1d array in c?
What is an identifier?
How we can insert comments in a c program?
What is difference between class and structure?
What is the best way to comment out a section of code that contains comments?