answersLogoWhite

0

1^2 = 1
11^2 = 121
111^2 = 12321
1111^2 = 1234321
11111^2 = 123454321













#include
#include
#include
void main()
{
clrscr(); int n;//soullessgod
cout<<"\n enter number of lines ";//whatsoever
cin>>n;
int a=1,b,s=1;
for(;a<=n;s=s*10+1)
{
for(b=n-a;b>=1;b--)
{
cout<<" ";
}
cout<cout<<"\n";
a++;
}

getch();
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the code in c plus plus which gives output 1 121 12321 1234321?

#include &lt;iostream&gt; int main() { std::cout &lt;&lt; "1 121 12321 1234321" &lt;&lt; std::endl; return 0; }


What is C program pattern 12321 121 1?

/*determine the pattern 1234321*/ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; main() { int i, j; for (i=1; i&lt;=7; i++) { if (i&lt;5) { j=i; printf("\n %d", j); } else { j=8-i; printf("\n %d", j); } } getch() }


What is the magic 11 trick?

1x1=1 11x11=121 111x111=12321 1111x1111=1234321 11111x11111=123454321 There is another 11 trick. 11 *11 ok so you always put the 11 on top. Then the number on the bottom. The first digit goes on the left. then leave a space for the middle number. Then the second digit and put it in the right spot. Then add those together and put that numbe rinto the middle spot! ----- 121


Write a c program to print the following pyramid 1 121 1231 12321 1234321?

To print the given pyramid pattern in C, you can use nested loops. The outer loop controls the rows, and the inner loop controls the numbers to be printed in each row. Here's a simple C program to achieve this: #include &lt;stdio.h&gt; int main() { int rows = 5; for (int i = 1; i &lt;= rows; i++) { for (int j = 1; j &lt;= i; j++) { printf(&quot;%d&quot;, j); } for (int j = i - 1; j &gt;= 1; j--) { printf(&quot;%d&quot;, j); } printf(&quot;\n&quot;); } return 0; } This program will output the desired pyramid pattern.


What are the release dates for As the World Turns - 1956 1-12321?

As the World Turns - 1956 1-12321 was released on: USA: 10 August 2004


What is 111111111times 111111111?

111111111 x 111111111 = 12'345.6789876, "Hope that helps." you can get the square of any number which contain only 1, like: 11 or 11111111 with the thrick below, &amp; of course there would be no need for any kinda calculator. 11*11=121 111*111=12321 1111*1111=1234321 got it ? just count how many times 1 has been repeated in the number, for instance in the last case it's been repeated 4 times. then simply write 1 2 3 4 3 2 1. this cutoff has no limitation in frequency of 1 in the number. &amp; Done.


How To Create Pyramid 1 11 121 1221 12321 In C?

To create the pyramid pattern of numbers 1, 11, 121, 1221, 12321 in C, you can use nested loops. The outer loop iterates through the rows, while the inner loop builds each row by printing numbers from 1 up to the current row index and then back down to 1. Here's a simple code snippet: #include &lt;stdio.h&gt; int main() { for (int i = 1; i &lt;= 5; i++) { for (int j = 1; j &lt;= i; j++) printf(&quot;%d&quot;, j); for (int j = i-1; j &gt;= 1; j--) printf(&quot;%d&quot;, j); printf(&quot;\n&quot;); } return 0; } This code will output the desired pyramid pattern.


What is the factor for 121?

The factors of 121 are 1&bull;121 and 11&bull;11 :)


What is the interest on a 10000 for 2 year at 11 percent note?

Total = 10000(1+i)n Total = 10000(1.2321)2 Total = 12321 Change = interest gained = 12321 - 10000 = 2321


How do you print 1 121 1331 14641 in c?

#include#includevoid main(){clrscr();for (int i=1;i


What are all the factors of 121?

1, 11 and 121


Write a c program to print 1 232 34543 5678765 using for loop?

If you visualize 1123581321 as a set of numbers (without spaces in between) instead of one number, you'll see that it's a set of the first 8 Fibnocci nos. - 1 1 2 3 5 8 13 21. The following program would print the required no. using a For looping structure. int main (void) { int i=1; int j=1; int k, num=1; for(k=0; k&lt;7; k++){ if(k==0){ printf("%d", num); } printf("%d", num); //next no. is the sum of previous two nos. in the series i=j; j=num; num=i+j; // 1 + 1 = 2 ... 1 + 2 = 3 ... 2 + 3 = 5 ... 3 + 5 = 8 // sum=i + j ... i takes value of j ... j takes value of sum ... repeat. } }