SlideShare uma empresa Scribd logo
1 de 2
hello, i have been trying to write this following forgram in c for the past couple of days but i can
not get my head around it. the program can only be written in C with C standard libraries. your
help will be much appreciated.
Please take the array {
Solution
#include <stdio.h>
#include <stdlib.h>
void duplicate(int a[], int n)
{
int i, j, count=0;
for(i = 0; i < n; i++)
for(j = i+1; j < n; j++)
if(a[i] == a[j])
{
printf("  Value ");
printf(" %d ", a[i]);
printf(" was found at indices: %d, %d ", i,j);
count++;
}
printf("  Total dublicate found:%d ", count);
}
int main()
{
int
a[]={47,48,58,123,456,789,188,0,3000,47,939,2373,1873,283,948,333,283,2835,248,444,555,73
2,1983,473,939,3000,7,9,2496,1729,1776,11,12,84,126,120,-1};
int n;
n=sizeof(a)/sizeof(a[0]);
duplicate(a,n);
return 0;
}

Mais conteúdo relacionado

Semelhante a hello- i have been trying to write this following forgram in c for the.docx

Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab PracticeMahmud Hasan Tanvir
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
 
In C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docxIn C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docxtristans3
 
C programming codes for the class assignment
C programming codes for the class assignmentC programming codes for the class assignment
C programming codes for the class assignmentZenith SVG
 
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translationShobhit Saxena
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignmentSaket Pathak
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functionsWay2itech
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentalsZaibi Gondal
 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.Shobhit Saxena
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2Koshy Geoji
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in CSaket Pathak
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkarsandeep kumbhkar
 
Core programming in c
Core programming in cCore programming in c
Core programming in cRahul Pandit
 

Semelhante a hello- i have been trying to write this following forgram in c for the.docx (20)

DSC program.pdf
DSC program.pdfDSC program.pdf
DSC program.pdf
 
C-programs
C-programsC-programs
C-programs
 
C
CC
C
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
 
In C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docxIn C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docx
 
operators.ppt
operators.pptoperators.ppt
operators.ppt
 
C programming codes for the class assignment
C programming codes for the class assignmentC programming codes for the class assignment
C programming codes for the class assignment
 
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translation
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignment
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functions
 
Embedded C - Day 2
Embedded C - Day 2Embedded C - Day 2
Embedded C - Day 2
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentals
 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
C Programming
C ProgrammingC Programming
C Programming
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
Progr3
Progr3Progr3
Progr3
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 

Mais de rtodd588

Hello- Would someone please help me with this question- Thank you! On.docx
Hello- Would someone please help me with this question- Thank you! On.docxHello- Would someone please help me with this question- Thank you! On.docx
Hello- Would someone please help me with this question- Thank you! On.docxrtodd588
 
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docx
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docxHeidebrecht Design acquired 30- of the outstanding common stock of Qua.docx
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docxrtodd588
 
he structural genes in an operon are all co-transcribed as a single mR.docx
he structural genes in an operon are all co-transcribed as a single mR.docxhe structural genes in an operon are all co-transcribed as a single mR.docx
he structural genes in an operon are all co-transcribed as a single mR.docxrtodd588
 
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docx
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docxhe ratio of the radius of an unknown nucleus X to a tritium nucleus T.docx
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docxrtodd588
 
hclo4+Lioh hclo4+LiohSolutionBalance Equation- Molecular Equation -.docx
hclo4+Lioh   hclo4+LiohSolutionBalance Equation- Molecular Equation -.docxhclo4+Lioh   hclo4+LiohSolutionBalance Equation- Molecular Equation -.docx
hclo4+Lioh hclo4+LiohSolutionBalance Equation- Molecular Equation -.docxrtodd588
 
Hawaii- California- and ________ already have no majority race or ethn.docx
Hawaii- California- and ________ already have no majority race or ethn.docxHawaii- California- and ________ already have no majority race or ethn.docx
Hawaii- California- and ________ already have no majority race or ethn.docxrtodd588
 
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docx
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docxHarper acquires 40 percent of the outstanding voting stock of Kinman C.docx
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docxrtodd588
 
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docx
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docxH The mineral perovskite is composed of calcium- oxygen- and titanium-.docx
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docxrtodd588
 
Graphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxGraphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxrtodd588
 
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxGiven this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxrtodd588
 
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxGrowing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxrtodd588
 
Group Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxGroup Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxrtodd588
 
how can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxhow can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxrtodd588
 
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxHolly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxrtodd588
 
Hi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxHi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxrtodd588
 
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxhich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxrtodd588
 

Mais de rtodd588 (16)

Hello- Would someone please help me with this question- Thank you! On.docx
Hello- Would someone please help me with this question- Thank you! On.docxHello- Would someone please help me with this question- Thank you! On.docx
Hello- Would someone please help me with this question- Thank you! On.docx
 
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docx
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docxHeidebrecht Design acquired 30- of the outstanding common stock of Qua.docx
Heidebrecht Design acquired 30- of the outstanding common stock of Qua.docx
 
he structural genes in an operon are all co-transcribed as a single mR.docx
he structural genes in an operon are all co-transcribed as a single mR.docxhe structural genes in an operon are all co-transcribed as a single mR.docx
he structural genes in an operon are all co-transcribed as a single mR.docx
 
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docx
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docxhe ratio of the radius of an unknown nucleus X to a tritium nucleus T.docx
he ratio of the radius of an unknown nucleus X to a tritium nucleus T.docx
 
hclo4+Lioh hclo4+LiohSolutionBalance Equation- Molecular Equation -.docx
hclo4+Lioh   hclo4+LiohSolutionBalance Equation- Molecular Equation -.docxhclo4+Lioh   hclo4+LiohSolutionBalance Equation- Molecular Equation -.docx
hclo4+Lioh hclo4+LiohSolutionBalance Equation- Molecular Equation -.docx
 
Hawaii- California- and ________ already have no majority race or ethn.docx
Hawaii- California- and ________ already have no majority race or ethn.docxHawaii- California- and ________ already have no majority race or ethn.docx
Hawaii- California- and ________ already have no majority race or ethn.docx
 
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docx
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docxHarper acquires 40 percent of the outstanding voting stock of Kinman C.docx
Harper acquires 40 percent of the outstanding voting stock of Kinman C.docx
 
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docx
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docxH The mineral perovskite is composed of calcium- oxygen- and titanium-.docx
H The mineral perovskite is composed of calcium- oxygen- and titanium-.docx
 
Graphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxGraphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docx
 
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxGiven this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
 
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxGrowing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
 
Group Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxGroup Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docx
 
how can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxhow can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docx
 
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxHolly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
 
Hi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxHi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docx
 
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxhich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
 

Último

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 

Último (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

hello- i have been trying to write this following forgram in c for the.docx

  • 1. hello, i have been trying to write this following forgram in c for the past couple of days but i can not get my head around it. the program can only be written in C with C standard libraries. your help will be much appreciated. Please take the array { Solution #include <stdio.h> #include <stdlib.h> void duplicate(int a[], int n) { int i, j, count=0; for(i = 0; i < n; i++) for(j = i+1; j < n; j++) if(a[i] == a[j]) { printf(" Value "); printf(" %d ", a[i]); printf(" was found at indices: %d, %d ", i,j); count++; } printf(" Total dublicate found:%d ", count); } int main() { int a[]={47,48,58,123,456,789,188,0,3000,47,939,2373,1873,283,948,333,283,2835,248,444,555,73 2,1983,473,939,3000,7,9,2496,1729,1776,11,12,84,126,120,-1}; int n; n=sizeof(a)/sizeof(a[0]); duplicate(a,n);