Commit 5249f7fc authored by shong7's avatar shong7
Browse files

class3: templates updated

parent 8e623388
#include <stdio.h>
int main(int argc, char **argv) {
if (argc > 2) {
fprintf(stderr, "usage: %s [<text>]\n", argv[0]);
return 1;
}
int parity = 0;
printf("%d\n", parity);
return 0;
}
......@@ -7,10 +7,15 @@ int main(void) {
// at the very beginning of your program, making the table
for (int i = 0; i < N_TRITS; i++) {
trit_encodings[i] = calloc(sizeof(char), 6);
// ADD YOUR CODES HERE
for (int j = 0; j < 5; j++) {
}
}
// ADD YOUR CODES HERE
// at the very end of your program, cleaning up memory
for (int i = 0; i < N_TRITS; i++) {
......
void print_upper(const char *text) {
}
int main(int argc, char **argv) {
if (argc == 1) {
fprintf(stderr, "usage: %s <text>\n", argv[0]);
return 1;
}
for (int i = 1; i < argc; i++) {
print_upper( );
}
printf("\n");
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment