SHARE
TWEET

Untitled

a guest Sep 18th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdio.h"
  2. #include "stdlib.h"
  3. int main ()
  4. {
  5.     int n, p, br=0, i;
  6.     printf ("Uneti broj \n");
  7.     scanf ("%d", &n);
  8.     int a[50];
  9.     if (n<0)
  10.     {
  11.         n=n*(-1);
  12.     }
  13.     p=n;
  14.     while (p!=0)
  15.     {
  16.         p=p/10;
  17.         ++br;
  18.     }
  19.     for(i=br-1;i>=0;i--)
  20.     {
  21.         a[i]=n%10;
  22.         n=n/10;
  23.     }
  24.    
  25.     for (i=0;i<br-1;i++)
  26.     {
  27.         printf ("%d%d ",a[i],a[i+1]);
  28.     }
  29.     system ("pause");
  30.     return 0;
  31. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top