answersLogoWhite

0

/*determine the pattern 1234321*/

#include<stdio.h>

#include<conio.h>

main()

{

int i, j;

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

{

if (i<5)

{

j=i;

printf("\n %d", j);

}

else

{

j=8-i;

printf("\n %d", j);

}

}

getch()

}

User Avatar

Wiki User

13y 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; }


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.


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 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


What two numbers go into -121?

1, 11, 121, -1, -11, -121


What does 121 with the exponent of 1 equal?

121^1 = 121. Any number with an exponent of 1 is equal to itself.


What are the fators of 121?

The factors of 121 are 1, 11, and 121.


What are the divisors of 121?

The divisors of 121 are: 1, 11, 121.