fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. #include<stdio.h>
  8. struct phone {
  9. char name[20];
  10. char number[20];
  11. int age;
  12. };
  13. void phone_sort(struct phone table[ ], int size)
  14.  
  15. void main (void)
  16. {
  17. int i, j;
  18. struct CARD temp;
  19. struct CARD c[4]={{"강감찬","1234-1234",30},
  20. {"사임당","1254-7854",44},
  21. {"이순신","2458-4598",28},
  22. {"홍길동","2468-1567",26}
  23. };
  24. for(i=0; i<3; i++)
  25. {
  26. for(j=i+1; j<4; j++)
  27. if(c[i].name > c[j].name)
  28. {
  29. temp =c[i];
  30. c[i] =c[j];
  31. c[j] = temp;
  32. }
  33. }
  34.  
  35. for(i=0; i<4; i++)
  36. {
  37. printf("%s %s%3d",c[i].name,c[i].tel, c[i].age);
  38. }
  39. }
  40. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,0): error CS1024: Wrong preprocessor directive
prog.cs(8,0): error CS1525: Unexpected symbol `struct'
prog.cs(8,13): error CS1525: Unexpected symbol `{'
prog.cs(9,10): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(10,12): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(13,1): error CS1547: Keyword `void' cannot be used in this context
prog.cs(13,15): error CS1525: Unexpected symbol `(', expecting `,', `;', or `='
prog.cs(13,41): error CS1525: Unexpected symbol `int', expecting `,', `;', or `='
prog.cs(18,0): error CS1525: Unexpected symbol `struct'
prog.cs(19,0): error CS1525: Unexpected symbol `struct'
prog.cs(19,14): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(19,27): error CS1525: Unexpected symbol `1234-1234'
prog.cs(19,37): error CS1525: Unexpected symbol `30'
prog.cs(20,11): error CS1525: Unexpected symbol `{'
prog.cs(20,20): error CS1525: Unexpected symbol `1254-7854'
prog.cs(20,30): error CS1525: Unexpected symbol `44'
prog.cs(21,12): error CS1525: Unexpected symbol `{'
prog.cs(21,21): error CS1525: Unexpected symbol `2458-4598'
prog.cs(21,31): error CS1525: Unexpected symbol `28'
prog.cs(22,12): error CS1525: Unexpected symbol `{'
prog.cs(22,21): error CS1525: Unexpected symbol `2468-1567'
prog.cs(22,31): error CS1525: Unexpected symbol `26'
Compilation failed: 22 error(s), 0 warnings
stdout
Standard output is empty