Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <assert.h>
  4. int main()
  5. {
  6.     int i=0,n,j=0;
  7.     char tab[5];
  8.     char napis[20]="Penguins=3";
  9.     while(napis[i]!='=')
  10.         i++;
  11.     while(napis[i++]!='\0')
  12.     {
  13.        tab[j]=napis[i];
  14.        j++;
  15.     }
  16.     n=atoi(tab);
  17.  
  18.     printf("%d",n);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement