IT (137) 썸네일형 리스트형 Algorithms(week3, problemset) 1. Plurality 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 #include #include #include #define MAX 9 typedef struct{ .. Arrays(week 2, problem set) 1. Readability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 #import #import #import #import int main(int argc, char *argv[]){ int z; if(argc = 3){ printf("Usage: ./caesar key\n"); return 1; } else if((z = atoi(argv[1])) == 0 ){ printf("Usage: ./caesar key\n"); return 1; } z = atoi(argv[1]).. C Programming Language(week1, problem set) https://cs50.harvard.edu/college/psets/1/ 1. Hello 1 2 3 4 5 6 7 8 #include #include int main(void) { string name = get_string("What is your name?\n"); printf("hello, %s\n", name); } 2a. Mario less 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include #include int main(void) { int stairs = get_int("Height: "); while(!(stairs >= 1 && stairs Memory (week3) Compiling contains four steps, preprocessing, compiling, assembling and linking. First convert a source code into required functions, like for instance in c, read hashtags and copy and past files. Second step is compiling, convert source code into assembling codes. Third step is assembling, converting assembling codes into machine codes, 1s and 0s. Last, link all files into 0s and 1s. Programmer.. Arrays and Sorting Algorithms (week2) Preprocessing – #include Compiling - programming language converts codes to assembly language for computer to understand Assembling – using assembling code and converts to 10101010100101001010s(machine code, object code) Linking – linking step links all the imported files, stdio.h + cs50.h + yourfile.h. These days, people call these four steps compiling to be general. Ram, random access memory, .. C Programming Language(week 1) Now a day, computers are performing billions of things in a second gigahertz speed, a more readable code is more preferred in some cases. Input | Source code – code we humans have written using java, c, python Compiler Output | Machine code – 0 and 1s Ram – temporary storage, has finite number of transistors which means there are finite of values that can be represented and stored accurately. Fo.. Computational Thinking & Scratch – Intro to Computer Science(week 0) Computer science is about problem solving H I (letter ascii) 72 73 (decimal numbers) 1001000 1001001 (binary 8 bit) Abstraction – converting lower level details into more simplified version and focus on problem solving Since there are so many languages that cannot be represented by 8 bit(256 different type of possibilities), now we use Unicode or utf-8 which uses 16 bit(2 to 16th power or 65536 .. 백준 9단계(9020) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { //3 //8 //10 //16 //result //3 5 //5 5 //5 11 public static void main(String[] args) thr.. 이전 1 ··· 6 7 8 9 10 11 12 ··· 18 다음