Computer Science, asked by shakerasultana1997, 10 months ago

algorithm for c++ programme using arrays and pointer​

Answers

Answered by piyushsonone
0

Answer:

Program:

#include <stdio.h>

// Function to sort the numbers using pointers

void sort(int n, int* ptr)

{

int i, j, t;

// Sort the numbers using pointers

for (i = 0; i < n; i++) {

for (j = i + 1; j < n; j++) {

if (*(ptr + j) < *(ptr + i)) {

t = *(ptr + i);

*(ptr + i) = *(ptr + j);

*(ptr + j) = t;

}

}

}

// print the numbers

for (i = 0; i < n; i++)

printf("%d ", *(ptr + i));

}

// Driver code

int main()

{

int n = 5;

int arr[] = { 0, 23, 14, 12, 9 };

sort(n, arr);

Answered by yash197911
0

</p><p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title of the document&lt;/title&gt; &lt;style&gt; html, body { margin: 0; padding: 0; width: 100%; height: 100%; display: table; background-color: white; } .container { display: table-cell; text-align: center; vertical-align: middle; } .glow { color: #FB4264; font-size: 9vw; line-height: 9vw; text-shadow: 0 0 3vw #F40A35; } .glow { animation: glow 1.2s ease infinite; -moz-animation: glow 1.2s ease infinite; -webkit-animation: glow 1.2s ease infinite; } @keyframes glow { 0%, 100% { text-shadow: 0 0 1vw #FA1C16, 0 0 3vw #FA1C16, 0 0 10vw #FA1C16, 0 0 10vw #FA1C16, 0 0 .4vw #FED128, .5vw .5vw .1vw #806914; color: #FED128; } 50% { text-shadow: 0 0 .5vw #800E0B, 0 0 1.5vw #800E0B, 0 0 5vw #800E0B, 0 0 5vw #800E0B, 0 0 .2vw #800E0B, .5vw .5vw .1vw #40340A; color: #806914; } } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;div class="glow"&gt;JAVA ONLY&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</p><p>

[/tex]

</p><p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title of the document&lt;/title&gt; &lt;style&gt; body { background: linear-gradient(90deg, rgba(177,64,200,1) 0%, rgba(109,9,121,1) 35%, rgba(45,1,62,1) 100%); } .glow { font-size: 70px; color: #ffffff; text-align: center; -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } @-webkit-keyframes glow { from { text-shadow: 0 0 10px #eeeeee, 0 0 20px #000000, 0 0 30px #000000, 0 0 40px #000000, 0 0 50px #9554b3, 0 0 60px #9554b3, 0 0 70px #9554b3; } to { text-shadow: 0 0 20px #eeeeee, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6; } } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1 class="glow"&gt;FollowMe&lt;/h1&gt; &lt;/body&gt; &lt;/html&gt;</p><p>

</p><p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title of the document&lt;/title&gt; &lt;style&gt; body { background: linear-gradient(90deg, rgba(177,64,200,1) 0%, rgba(109,9,121,1) 35%, rgba(45,1,62,1) 100%); } .glow { font-size: 70px; color: #ffffff; text-align: center; -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } @-webkit-keyframes glow { from { text-shadow: 0 0 10px #eeeeee, 0 0 20px #000000, 0 0 30px #000000, 0 0 40px #000000, 0 0 50px #9554b3, 0 0 60px #9554b3, 0 0 70px #9554b3; } to { text-shadow: 0 0 20px #eeeeee, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6; } } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1 class="glow"&gt;HTML EXPERT&lt;/h1&gt; &lt;/body&gt; &lt;/html&gt;</p><p>[tex]</p><p>Try it Yourself »</p><p></p><p>Let’s see another example:</p><p></p><p>Example</p><p></p><p>[tex]&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title of the document&lt;/title&gt; &lt;style&gt; html, body { margin: 0; padding: 0; width: 100%; height: 100%; display: table;

&lt;svg width="4p0" height="300" viewBox="0 0 200 200"&gt;</p><p>&lt;g transform="translate(100 100)"&gt;</p><p>&lt;path transform="translate(-50 -50)" fill="tomato" d="M92.71,7.27L92.71,7.27c-9.71-9.69-25.46-9.69-35.18,0L50,14.79l-7.54-7.52C32.75-2.42,17-2.42,7.29,7.27v0 c-9.71,9.69-9.71,25.41,0,35.1L50,85l42.71-42.63C102.43,32.68,102.43,16.96,92.71,7.27z"&gt;&lt;/path&gt;</p><p>&lt;animateTransform </p><p>attributeName="transform" </p><p>type="scale" </p><p>values="1; 1.5; 1.25; 1.5; 1.5; 1;" </p><p>dur="5s" </p><p>repeatCount="indefinite"</p><p>additive="sum"&gt; </p><p>&lt;/animateTransform&gt;</p><p>&lt;/g&gt;</p><p>&lt;/svg&gt;</p><p>

@yash197911

Similar questions