daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     char tel[11] = {0};
  6.     char tel2[15] = {'(', '0', '0', ')', '0', '0', '/', '0', '0', '0', '-', '0', '0', '0', '0'};  //(xx)xx-xxx-xxxx
  7.     int i;
  8.  
  9.     printf("Kerem a telefonszamot: ");
  10.     scanf("%s",&tel);
  11.  
  12.     tel2[1] = tel[0];
  13.     tel2[2] = tel[1];
  14.     tel2[4] = tel[2];
  15.     tel2[5] = tel[3];
  16.     tel2[7] = tel[4];
  17.     tel2[8] = tel[5];
  18.     tel2[9] = tel[6];
  19.     tel2[11] = tel[7];
  20.     tel2[12] = tel[8];
  21.     tel2[13] = tel[9];
  22.     tel2[14] = tel[10];
  23.  
  24.     for (i = 0; i < 15; i++)
  25.         {
  26.             printf("%c",tel2[i]);
  27.         }
  28.  
  29. }
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