Computer Science, asked by vishnunama2924, 1 year ago

C program to find the largest and smallest digit of a number

Answers

Answered by Aishwarya98
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
Aishwarya98: should mark me as brainliest
Aishwarya98: don't forget to mark me as brainliest
Aishwarya98: execute this program in your system and get the output
Similar questions