C PROGRAM TO FIND LARGEST AND SMALLEST NUMBER IN AN ARRAY
#include<stdio.h> #define MAX 25 //maximum size of array is 25 main() { int i,n,LargeNo,SmallNo,arr[MAX]; printf(" *** C PROGRAMS BLOG ***"); printf("\n >>> Program to find Largest element in array <<<"); printf("\n\n Enter the size of array: "); scanf("%d",&n); //taking size of array as input from user printf("\n Enter the %d elements of array: \n",n); //taking input all the elements of array using for loop for(i=0;i<n;i++) { printf("\n arr[%d]:",i+1); scanf("%d",&arr[i]); } LargeNo = arr[0]; SmallNo = arr[0]; for(i=0;i<n;i++) { //checking for Largest Number if(arr[i]>LargeNo) { LargeNo = arr[i]; } //checking for Smallest Number if(arr[i]<SmallNo) { SmallNo = arr[i]; } } //printing the largest and Smallst elements in array printf("\n The Largest Element in the Array is: %d ",LargeNo); printf("\n The Smallest Element in the Array is: %d ",SmallNo); getch(); }
Sample Output :
Useful codes provided.
ReplyDeletesap gold partner
SAP Partners
SAP Implementation
HANA Technology
Good
ReplyDeleteHere is a link for C/C++ programs and pointer programs. This may be useful for you.
C/C++ Programs
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehow can made pascal triangle in c programming
ReplyDeletehi.its really awesome blog.thank you for sharing this blog.
ReplyDeleteSalesforce Training
actually it was an awesome blog.thank you for sharing this.its really informative to me.
ReplyDeleteC Programming Training
hi its really awesome blog.thank you for sharing this blog.
ReplyDeleteC Programming Training
Very Informative! This blog is great source of information which is very useful for me. eCommerce Solution Provider India
ReplyDeleteThank you for sharing this valuable information.
ReplyDeleteOffshore software development company India
Thanks for the Information!
ReplyDeleteC Programming
Very Useful Post!Thanks!
ReplyDeleteC Programming
really nice blog about c. c is the base for java. if you clear about c then learning of java is very simple to you. for best java training in chennai reach us at TIA academy
ReplyDeleteI have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job . If anyone want Java Training in Chennai, Please visit our page
ReplyDeleteJava Training in Chennai
I have read your blog very clearly. I got lot of useful information from this blog.You have good coding knowledge. keep sharing more blogs like this type of coading. Thanks for sharing.
ReplyDeleteSoftware Testing Training in Chennai
nice tutorial
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice tutorial. to learn more c programming visit here.
ReplyDeleteNice blog, thanks for sharing useful information.
ReplyDeleteThanks
ReplyDeletelove calculator program in c
C Solved Programs
Data Structures Tutorial
technicalseek
Thanks for sharing this post. Your post is really very helpful its students.
ReplyDeleteDevOps Online Training
ReplyDeleteExcellent content!!! your content is a great inspiration for writers.
selenium testing training in chennai
best selenium training center in chennai
Selenium Training in Chennai
Big Data Training in Chennai
Hadoop Training in Chennai
java class
java training center in chennai
java coaching center in chennai
JAVA Training in Chennai
Thank your valuable content.we are very thankful to you.one of the recommended blog.which is very useful to new learners and professionals.content is very useful for hadoop learners
ReplyDeleteBest ASP.NET MVC Online Training Institute
Best Spring Online Training Institute
Best Devops Online Training Institute
Best Datascience Online Training Institute
Best Oracle Online Training Institute
Best AWS Online Training Institute
Best AngularJS Online Training Institute
Best C-language Online Training Institute
If You are looking for java programs we have it at our Blog Please have a look https://letml.blogspot.com/2019/02/inheritancejavaoopconcepts.html
ReplyDeleteThis article is very useful for us but please deep discuss about for(;;) for loop in c and also provide excecution flow of for(;;) loop
ReplyDeleteYour good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.Surya Informatics
ReplyDeleteWhat a content
ReplyDeletehttps://wethecoders.com/csharp-programming-assignment-help
https://wethecoders.com/about-us
https://wethecoders.com/android-project-ideas-android-programming-android-assignment-help
https://wethecoders.com/asp-net-mcv-assignment-help/
Keep Sharing..
ReplyDeletefinal year project proposal for information technology
free internship for bca
web designing training in chennai
internship in coimbatore for ece
machine learning internship in chennai
6 months training with stipend in chennai
final year project for it
inplant training in chennai for ece students
industrial training report for electronics and communication
inplant training certificate
Nice..
ReplyDeletesnowflake interview questions and answers
inline view in sql server
a watch was sold at loss of 10
resume format for fresher lecturer in engineering college doc
qdxm:sfyn::uioz:
java developer resume 6 years experience
please explain in brief why you consider yourself suitable for the position applied for
windows 10 french iso kickass
max int javascript
tp link router password hack
Great efforts put to publish these kinds of articles that are very useful to know. I’m thoroughly enjoying your blog. And Good comments create great relations. You’re doing an excellent job. Keep it up.
ReplyDeleteMagento Development Training Course in Chennai Zuan Education
Selenium Training Course in Chennai Zuan Education
Write a C program to print all prime number between 1 to 300 using for loop.
ReplyDeleteCode of given problem:
int main()
{
int a,b;
printf("List of prime numbers between 1 to 300:\n");
printf("%d\t",a=2);
for(a=1;a<=300;a++)
{
for(b=2;b<=a-1;b++)
if(a%b==0)
break;
else if(b==a-1)
{
printf("%d\t",a);
}
}
return 0;
}
Very informative blog!
Please take some time to visit my blog @
Top 10 programming examples in C
Thanks!
ReplyDeleteWhatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear.i also want to inform you the learn salesforce development . thankyou . keep sharing..
Nice article. your algo for solving problem is very good . visit more good problem collection Top coding programs
ReplyDeleteMore programming question
ReplyDeleteI read your article content is very nice blog. thank you so much useful.
ReplyDeletepython training in chennai
python online training in chennai
python training in bangalore
python training in hyderabad
python online training
python flask training
python flask online training
python training in coimbatore
This comment has been removed by the author.
ReplyDeleteReally nice blog, very infromative. You can refer more topics related to C language like C pointers and C Programs from here for future articles
ReplyDeleteThis comment has been removed by the author.
ReplyDelete+96893560417 Muscat escort I'm Roshni! I have a thin and surprising body, regular boobs which you can have loads of fun with me. Escort Muscat Polite and we'll dressed, conversant in English. A refined and tasteful young lady who will make your dreams materialize Oman Escort +96893560417
ReplyDeleteEscort in Oman
Muscat escort
Escort Muscat
Escort in Muscat
for new trending corse video easy basis click on lick
ReplyDeletehttps://www.youtube.com/channel/UCQsMOku4R7qXQaSQLGHtRXw
LABOUR MOBILITY
ReplyDeleteCDACian
ReplyDeletePython
DATABase
Artificial Intelligence
JAVA
Web Development
Thanks for sharing such informative knowledgeCBSE board curriculum
ReplyDelete