#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();
}
#include
int main()
{
clrscr();
cout<<"TRIANGLE OF NUMBERS"<
{
for(int j=1;j<=i;j++)
{
cout<<"%d"<}
cout<<"\n";// instead of \n can have \t according to requirement
}
getch();
return 0;
}
#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();
}
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;
}
#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
#include
int main ()
{
int i,j;
for (i=5;i>=1;i--)
{
for (j=1;j<=i;j++)
{
cout << i;
}
cout << endl;
}
}
Use a double for loop.
for(int x=1; x<=4; x++){
for(int y=1; y<=x; y++){
cout<<y;
}
cout<<"\n";
}
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.
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?
write a c++ program to convert binary number to decimal number by using while statement
a triangle then a square :)
A = 5do{statement;A = A + 1;} while (A < 10)
There is no gotoxy statement in C.
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?
write a c++ program to convert binary number to decimal number by using while statement
write a c++program by using if statement to read a number and check whether it is positive or negative
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.
{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.
a triangle then a square :)
The sum of the three interior angles of a triangle always total 180 degrees.
A = 5do{statement;A = A + 1;} while (A < 10)
There is no gotoxy statement in C.
This is a statement with a question mark?
digits
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.