answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

int main()

{

int i,j,k,row,m;

printf("Enter the no of rows:");

scanf("%d",&row);

m=row;

for(i=0;i<m;i++)

{

printf("\n");

for(k=0;k<row;k++)

printf(" ");

for(j=0;j<=i;j++)

printf(" *");

row--;

}

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include #include
int main()
{
clrscr();
cout<<"TRIANGLE OF NUMBERS"<for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
cout<<"%d"<}
cout<<"\n";// instead of \n can have \t according to requirement
}
getch();
return 0;
}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

#include<stdio.h>

#include<conio.h>

void main(void)

{

int i,j;

for(i=1;i<=10;i=i+1)

{

for(j=1;j<=1;j=j+1)

printf("*");

printf("\n");

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

I need a program displays the fallowing tables (in this exact pattern)

1x1=1

2x1=2 2x2=4

3x1=3 3x2=6 3x3=9

4x1=4 4x2=8 4x3=12 4x4=16

5x1=5 5x2=10 5x3=15 5x4=20 5x5=25

this is what i have so far::

int main()

{

int i, j;

for(i=1; i<=5; i++) {

for(j=1; j<=i; j++) {

printf("%d*%d=%d\t", i, j, i * j);

}

printf(" \n") ;

}

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

#include void mytriangle(int i, int cnt) { int star = 0; int space = 0; int j = 0; space = cnt - i; for(j = 0; j < space; j++) printf(" "); for(star = 1; star

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

#include

int main ()
{
int i,j;
for (i=5;i>=1;i--)
{
for (j=1;j<=i;j++)
{
cout << i;
}
cout << endl;
}
}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Use a double for loop.

for(int x=1; x<=4; x++){

for(int y=1; y<=x; y++){

cout<<y;

}

cout<<"\n";

}

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

There is insufficient information in the question to properly answer it. You did not provide details of which kind of triangle to print. Please restate the question.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program using one print statement to print the asterisks triangle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program that input a positive integer and prints a triangle using for loop?

write a program that reads in the size of the side of square and then pints a hollow square of that size out of asterisks and blanks?


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


Write a program to print an astrick in 1st line 2 astricks in 2nd line and so on 25 astricks in 25th line?

Here is a simple Python program to print asterisks as described: for i in range(1, 26): print('*' * i) This will output asterisks from 1 to 25 as required.


Write a pascal program that compute an area of a triangle?

{A program to compute the area of a triangle} {by Ogboin W. Meshach} Var; b,h:real; BEGIN Writeln('Triangle'); Write('Base: '); Readln(base); Write('Height: '); Readln(height); area:=0.5*base*height; Writeln('Area: ', area :0:2); End.


Write a program in qbasic to make a hut using print statemant?

a triangle then a square :)


Write a general statement concerning the sum of the measures of the angles of a triangle?

The sum of the three interior angles of a triangle always total 180 degrees.


Write a program that will graph using for loop?

A = 5do{statement;A = A + 1;} while (A < 10)


How do you write a program using the gotoxy statement and print function to display letters of the alphabet on the computer screen?

There is no gotoxy statement in C.


Write a C program to declare result of a student using multilevel?

This is a statement with a question mark?


What symbols are used to write numerals digits or coordinates or factors or divisors or asterisks?

digits


Dilating a triangle changes the shape of the triangle but does not change its shape True or false?

As written, the statement is false. You can't have it both ways. I suspect you meant to write that dilating a triangle changes the size or area of the triangle but does not change its shape. That would be true.