answersLogoWhite

0

#include<stdio.h>

int main ()

{

int size,a[100];

int i,j,k;

printf("Enter size of the array\n");

scanf("%d",&size);

printf("Enter elements of the array\n");

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

scanf("%d",&a[i]);

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

{

for(j=i+1;j<size;j++)

{

if(a[i]==a[j])

{

for(k=j;k<size;k++)

{a[j]=a[j+1];

size--;

}

}

}

}

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

printf("%d\t",a[i]);

return 0;

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a program to read your name and reverse it using arrays?

abdulrahman


Write a program to find intersection between two arrays?

#include&lt;stdio.h&gt;


How do you write c program to perform sum of elements of matrix using pointers with functions?

i cant write


How do you write a program to performs all airthematic operation between two matrixs using array?

To write a program that performs arithmetic operations between two matrices using arrays, first define two 2D arrays to represent the matrices. Then, create functions for each arithmetic operation (addition, subtraction, multiplication, etc.) that iterate through the elements of the matrices, performing the operation element-wise. Ensure to handle cases where the matrices have different dimensions, as this would affect the validity of the operations. Finally, print the result matrix after each operation.


Write a program using iostreams to take as input two multi-dimensional arrays and print their sum as output Matrix Addition in Matrix format?

http://www.assignmentsclub.com/


How are arrays processed?

Usually one element at a time. If you want to process all elements of an array, you write a loop.Usually one element at a time. If you want to process all elements of an array, you write a loop.Usually one element at a time. If you want to process all elements of an array, you write a loop.Usually one element at a time. If you want to process all elements of an array, you write a loop.


How do you write a java program to find the transpose of the matrix for the given elements?

You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.


What type of program do you use to write a letter?

The most common is Microsoft Word


Write a C program using dynamic memory allocation to find the sum of elements of a matrix?

Did you know that memory allocation is not needed to display the matrix? However, the C program is to find the sum of all the elements.


Would you Write c plus plus program using array for Fibonacci number?

You can write a C++ fib pro using arrays but the problem is the prog becomes very complicated since u need to pass the next adding value in an array.....


Write a program demonstrating the usage of pointers with one dimensional and two dimensional arrays?

int main (int,char* argv[]) { int i, for (i=0;i&lt;arg;++i) printf ("% 2d:% s\a";i,argv[i]); return o; }


How do you write a program that calculates the sum of the matrix elements given numbers?

ring me and ill explain - 086 22222222222222227 ring me