From d6c12f3e5a30d7c04696bf7d02b92696f4f32733 Mon Sep 17 00:00:00 2001 From: Vaidehi Bhardwaj <61655574+Vaidehi0421@users.noreply.github.com> Date: Thu, 1 Oct 2020 01:16:06 +0530 Subject: [PATCH] Added a program in C --- C/program-51/README.md | 3 +++ C/program-51/program.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 C/program-51/README.md create mode 100644 C/program-51/program.c diff --git a/C/program-51/README.md b/C/program-51/README.md new file mode 100644 index 00000000..18f1c5a3 --- /dev/null +++ b/C/program-51/README.md @@ -0,0 +1,3 @@ +Program 51 + +Write an program to print duplicates in an array. \ No newline at end of file diff --git a/C/program-51/program.c b/C/program-51/program.c new file mode 100644 index 00000000..c255d1a5 --- /dev/null +++ b/C/program-51/program.c @@ -0,0 +1,20 @@ +#include + +int main() { + int arr[100],freq[100]; + int n,i; + printf("Enter the number of elements in array \n"); + scanf("%d",&n); + printf("Enter elements in the array \n"); + for(i=0;i1) + printf("%d ",i); + } + printf("\n"); +} \ No newline at end of file