TeamFocus-Matija

Prvi projekat

Apr 20th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2.  
  3. #include <stdio.h>
  4.  
  5. int main(void){
  6.     int ceoBroj;
  7.     double realanBroj;
  8.     int i;
  9.  
  10.     //printf("Unesite ceo broj:\t");
  11.     //scanf("%d", &ceoBroj);        //%d--->int//%lf---->double//%f--->float//
  12.  
  13.     //if (ceoBroj<6){
  14.     //  printf("Pali ste ispit!\n");
  15.     //}
  16.     //else if (ceoBroj>5 && ceoBroj<10){
  17.     //  printf("Super ste polozili!\n");
  18.     //}
  19.     //else{
  20.     //  printf("Pokidali ste!\n");
  21.     //}
  22.  
  23.     for (i = 1; i <= 10; i++){              //NAJBOLJE KADA SE ZNA KOJA JE DG ILI GG
  24.         printf("FOR PETLJA: %d\n", i);
  25.     }
  26.     i = 1;
  27.     while (i <= 10){
  28.         printf("WHILE PETLJA: %d\n", i);
  29.         i++;
  30.     }
  31.  
  32.     i = 1;
  33.     do{
  34.         printf("DO WHILE PETLJA: %d\n", i);
  35.         i++;
  36.     } while (i <= 10);
  37.  
  38.  
  39.  
  40.     return 0;
  41. }
Add Comment
Please, Sign In to add comment