C program to find the largest and smallest digit of a number
Answers
Answered by
0
#include<stdio.h>#include<conio.h>void main(){int a[50],size,i,big,small;clrscr();printf("Enter the size of array:");scanf("%d",&size);printf("Enter %d elements of Array:",size);for(=0;i<size;i++){scanf"%d",&a[i]);}big=a[0];for(i=0;i<size;i++){if(big<a[i])big=a[i];}printf("Largest element:%d",big);small=a[0];for(i=1;i<size;i++){if(small>a[i])small=a[i];}printf("Smallest element:%d",small);getch();}
Aishwarya98:
You must mark me as brainliest
Similar questions