#include <stdio.h>
#include <conio.h>
void main()
{
int height, line, i;
clrscr();
scanf("%d", &height);
for (i = 0; i < height - 1; ++i)
printf(" ");
printf("1\n");
for (line = 1; line < height; ++line)
{
for (i = 0; i < height - line - 1; ++i)
printf(" ");
for (i = 0; i < line; ++i)
printf("%d", line + 1);
printf(" ");
for (i = 0; i < line; ++i)
printf("%d", line + 1);
printf("\n");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
i=j=0;
printf("enter the value of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d\n",i,j);
i=i+1;
}
}
getch();
}
include <stdio.h>int main(){ int i,space,rows,k=0; printf("Enter the number of rows: "); scanf("%d",&rows); for(i=1;i<=rows;++i) { for(space=1;space<=rows-i;++space) { printf(" "); } while(k!=2*i-1) { printf("* "); ++k; } k=0; printf("\n"); } return 0;}
public class whileloop
{
public static void main (String args[])
{
int a=1;
while(a<=5)
{
int b=1;
while(b<=a)
{System.out.print(b);
b++;
}
System.out.println();
a++;
}
}
}
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
#include
you do this 10 print "0112358132134" use the whole of the thing
echo 'print a pattern'
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
hi question is here, 1 1 2 1 2 3 1 2 3 4
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
123454321
#include
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
you do this 10 print "0112358132134" use the whole of the thing
write a program to print A to Z on screen in c?
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
Write a c program to print the 100 to 1 nos
echo 'print a pattern'
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end