#include
int main()
{
int i;
for(i = 1; i <= 10; i = i + 1)
{
printf("%d %d\n", i, i * i);
}
return 0;
}
program to print the numbers from 1 to 10 and their squares.
Subscribe to:
Post Comments (Atom)
If you face any Problem in viewing code such as Incomplete "For Loops" or "Incorrect greater than or smaller" than equal to signs then please collect from My Web Site CLICK HERE
More Useful Topics... |
|
History Of C..
In the beginning was Charles Babbage and his Analytical Engine, a machine
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.
My 1st Program...
#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n");
printf ("\t\t\t\"Life is Good...\"\n");
printf ("\t\t\t********************************");
getch ();
}
Next Step...
#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n\n\n\n\n");
printf ("\t\t\t --------------------------- \n\n");
printf ("\t\t\t | IGCT, Info Computers, INDIA | \n\n");
printf ("\t\t\t --------------------------- ");
}
how to make a NUMBER TRIANGLE FROM 1 TO 10
ReplyDelete1
2 3
4 5 6
7 8 9 10
for(i=1;i<=10;i++)
DeleteRepeat same for j
How can i form
ReplyDelete1
2 3
4 5 4
7 8 9 10
how can i form
ReplyDelete***1***
**2*3**
*4*5*6*
7*8*9*10
how can i print
ReplyDelete1 to 100 in 10 subsequent pages
#include
ReplyDelete#include
void main()
{
int i,a,j,k=1;
for(i=1;i<=4;i++)
{
for (a=1;a<=(-1*(i-5));a++)
printf(" ");
for (j=1;j<=i;j++)
{
printf("%d ",k);
k++;
}
printf("\n");
}
getch();
}
Flow chart for the square and cube of 1 to 10 numbers
ReplyDeleteWrite a program that prompts the user to enter a number n, then prints all the even
ReplyDeletesquares between 1 and n.