daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /******************************************************************************
  2.  
  3.                             Online C Compiler.
  4.                 Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11. int main()
  12. {
  13.     char c; // Definisemo novi Char
  14.     scanf("%c", &c); // Ucitavamo ga u konzoli
  15.    
  16.     // IF ELSE
  17.     if(c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9')
  18.     {
  19.         printf("\nNe znam sta treba ovde ako jeste");    
  20.     }
  21.     else
  22.     {
  23.         printf("\nine");    
  24.     }
  25.    
  26.     // TERNAR
  27.     (c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9') ? printf("\nNe znam sta treba ako jeste.") : printf("\nine");
  28.  
  29.     return 0;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top