質問編集履歴

3

修正

2018/07/09 04:44

投稿

forza
forza

スコア21

test CHANGED
File without changes
test CHANGED
@@ -46,11 +46,11 @@
46
46
 
47
47
  }
48
48
 
49
- for (i = 0; str[i]!=0; i++)
49
+ for (i = 0; i<200; i++)
50
50
 
51
51
  {
52
52
 
53
- for (j = 0; str[j]!=0; j++)
53
+ for (j = 0; i<200-i; j++)
54
54
 
55
55
  {
56
56
 

2

プログラム修正

2018/07/09 04:44

投稿

forza
forza

スコア21

test CHANGED
File without changes
test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  {
52
52
 
53
- for (j = i+1; str[j]!=0; j++)
53
+ for (j = 0; str[j]!=0; j++)
54
54
 
55
55
  {
56
56
 

1

プログラムの変更

2018/07/09 04:13

投稿

forza
forza

スコア21

test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  {
56
56
 
57
- fscanf(fin, "%s", &str[i]);
57
+ fscanf(fin, "%c", &str[i]);
58
58
 
59
59
  if(str[i]>str[j])
60
60
 
@@ -68,7 +68,7 @@
68
68
 
69
69
  }
70
70
 
71
- fprintf(fout,"%s",&str[i]);
71
+ fprintf(fout,"%c",&str[i]);
72
72
 
73
73
  }
74
74