+ 8
Can anyone please explain me how can output is 3??
6 Respuestas
+ 5
Thank you so much.
+ 4
Dhruva Pandya
m = a
m = 9
b < m => 3 < 9 => true so m = 3// m = b
c < m => 12 < 9 => false so finally m is 3
+ 4
Thank you so much Atul.
+ 3
#include <stdio.h>
int min(int a, int b, int c)
{
int m = a;//9
if (b< m)//3<9(true) {
m = b;//m=3
}
if (c< m)//12<3 (false){
m = c;
}
return m;
}
int main() {
printf("%d", min(9, 3, 12));
}
+ 3
Hope this helps you
+ 3
My pleasure