summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wk2/sect2/alpha.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/wk2/sect2/alpha.c b/wk2/sect2/alpha.c
index 6de0b62..bf9a30b 100644
--- a/wk2/sect2/alpha.c
+++ b/wk2/sect2/alpha.c
@@ -7,14 +7,16 @@ int main(void)
{
string word = get_string("Word: ");
int l = strlen(word);
+ int k = 0;
for (int i = 0; i < l; i++)
{
if (((word[i] > 96 && word[i] < 123) && (word[i - 1] > 96 && word[i - 1] < 123) && (word[i] > word[i - 1])))
{
- int a = word[i];
- word[i] = word[i - 1];
- word[i - 1] = a;
+
}
}
- printf("%s\n", word);
+ if ()
+ {
+ printf("%s\n", word);
+ }
}