Crackbone

dv5z1

Apr 12th, 2021
603
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*1. Koristeći uvjetni operator (?:) napisati funkciju koja vraća najmanji od tri broja.
  2. Zabranjeno je koristiti if naredbu.*/
  3.  
  4.  
  5.  
  6. #define _CRT_SECURE_NO_WARNINGS
  7.  
  8. #include<stdio.h>
  9.  
  10.  
  11. int main()
  12. {
  13.     int a, b, c;
  14.     printf("\nUnesi tri broja:\n");
  15.     scanf(" %d %d %d", &a, &b, &c);
  16.     ((b < a) && (b < c)) ? printf("Najmanji je b: %d", b) : ((a < c) ? printf("Najmanji je a: %d", a) : printf("Najmanji je c: %d", c));
  17.     getchar();
  18.     getchar();
  19.     return 1;
  20. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×