Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 804b4fb

Browse files
review sovle 4th problrm
1 parent 7d2789a commit 804b4fb

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

‎a.out‎

0 Bytes
Binary file not shown.

‎solve_problem.c‎

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,40 @@
7474
// }
7575
// 👉👉 🔹🔹 question 4️⃣ take a string input from the user using %c
7676

77-
7877
#include <stdio.h>
7978
int main(){
80-
char str[120];
81-
char ch;
82-
int i = 0;
83-
while (ch != '\n')
84-
{
85-
scanf("%c" , &ch);
86-
str[i] = ch;
87-
i++;
88-
}
89-
str[i] = '0円';
90-
puts(str);
91-
79+
char srt[15];
80+
char ch;
81+
int i = 0;
82+
while (ch != '\n')
83+
{
84+
scanf("%c" , &ch);
85+
srt[i] = ch;
86+
i++;
87+
}
88+
srt[i] = '0円';
89+
puts(srt);
90+
9291
return 0;
9392
}
9493

94+
// #include <stdio.h>
95+
// int main(){
96+
// char str[120];
97+
// char ch;
98+
// int i = 0;
99+
// while (ch != '\n')
100+
// {
101+
// scanf("%c" , &ch);
102+
// str[i] = ch;
103+
// i++;
104+
// }
105+
// str[i] = '0円';
106+
// puts(str);
107+
108+
// return 0;
109+
// }
110+
95111
// #include <stdio.h>
96112
// int main(){
97113
// return 0;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /