fixed formatting
This commit is contained in:
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -6,5 +6,8 @@
|
||||
"cmake.configureArgs": [
|
||||
"-DVCPKG_MANIFEST_MODE=OFF",
|
||||
"-DVCPKG_TARGET_TRIPLET=x64-linux"
|
||||
]
|
||||
],
|
||||
"files.associations": {
|
||||
"string.h": "c"
|
||||
}
|
||||
}
|
||||
13
puzzle1.c
13
puzzle1.c
@@ -1,5 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#define stringSize 20
|
||||
|
||||
@@ -11,22 +11,17 @@ char stringTwo[stringSize];
|
||||
int readIntoList(char *stringList) {
|
||||
int index = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
while (1) {
|
||||
char next = getchar();
|
||||
if (next == '.')
|
||||
{
|
||||
if (next == '.') {
|
||||
break;
|
||||
}
|
||||
else if (next != '\n')
|
||||
{
|
||||
} else if (next != '\n') {
|
||||
stringList[index] = next;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
printf("enter list size: \n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user