Advertisement
Guest User

fb alphabet c code

a guest
Dec 24th, 2011
2,330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. char c;
  6. int d;
  7. FILE *p = NULL;
  8. char *file = "Hello.txt";
  9. p = fopen(file, "w");
  10. char code[30][17] ={"107015582669715","116067591741123","115602405121532","112542438763744","115430438474268","109225112442557","111532845537326","111356865552629","109294689102123","115636698451811","116651741681944","115807951764667","106596672714242","108634132504932","116564658357124","111669128857397","107061805996548","106699962703083","115927268419031","112669162092780","108983579135532","107023745999320","106678406038354","116740548336581","112416755444217","149333368464171"};
  11. scanf("%c",&c);
  12. while (c!='\n'){
  13.     d=(int)c;
  14.     if(d==32) fprintf(p,"\n");
  15.     else
  16.     fprintf(p,"[[%s]] ",code[d-97]);
  17.     scanf("%c",&c);
  18.     }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement