#include<stdio.h>
#include<conio.h>
int small(int *a, int *b, int *c);
void main()
{
int num1, num2, num3, smallnum;
clrscr();
printf("Enter the 3 numbers\n");
scanf("%d%d%d",&num1, &num2, &num3);
smallnum = small (&num1, &num2, &num3);
printf("Smallest number = %d", smallnum);
getch();
}
int small(int *a, int *b, int *c)
{
int result = *a;
if ( *a > *b)
result = *b;
if (result > *c)
result = *c;
return result;
}
Showing posts with label Smallest of 3 numbers using function. Show all posts
Showing posts with label Smallest of 3 numbers using function. Show all posts
Subscribe to:
Posts (Atom)
NTPC Recruitment 2026: 135 Deputy Manager Posts, Eligibility, Vacancies & Apply Online
NTPC Recruitment 2026: 135 Deputy Manager Posts, Eligibility, Vacancies & Apply Online NTPC Recruitment 2026: Apply online for 135 Deput...