diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..6a85229 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++.exe build active file", + "command": "C:\\MinGW\\bin\\g++.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/C++/a.exe b/C++/a.exe new file mode 100644 index 0000000..00c4979 Binary files /dev/null and b/C++/a.exe differ diff --git a/C++/s1.cpp b/C++/s1.cpp index 95629da..ff6dba0 100644 --- a/C++/s1.cpp +++ b/C++/s1.cpp @@ -6,7 +6,7 @@ using namespace std; int reverse(int x) { long r=0; while(x){ - r=r*10+x/10; + r=r*10+x%10; x=x/10; } return r; @@ -14,4 +14,4 @@ int reverse(int x) { int main(void){ cout << reverse(12345) << endl; -} +} \ No newline at end of file diff --git a/C++/s2.cpp b/C++/s2.cpp index d995ee5..9dd7b18 100644 --- a/C++/s2.cpp +++ b/C++/s2.cpp @@ -12,7 +12,7 @@ int main(){ for(int i=0; i < myVec.size(); i++){ std :: cout << myVec[i] << std :: endl; } - std :: cout << "Element at index 3: "<< myVec.at(3) << std::endl; + std :: cout << "Element at index 3: "<< myVec.at(2) << std::endl; return 0; } diff --git a/C++/s4.cpp b/C++/s4.cpp index 727e620..4829b99 100644 --- a/C++/s4.cpp +++ b/C++/s4.cpp @@ -4,7 +4,7 @@ #include #include using namespace std; -#define Random(n) random()%n +#define Random(n) random()%n int random(){ srand(time(0)); diff --git a/C++/s5.cpp b/C++/s5.cpp index 3c05697..11c3b9b 100644 --- a/C++/s5.cpp +++ b/C++/s5.cpp @@ -4,7 +4,7 @@ using namespace std; int main(void){ string string1 = "Hello"; - string string2 = "Horld"; + string string2 = "HellO"; if (string1 == string2) cout << "Equal"; diff --git a/C++/s5.exe b/C++/s5.exe new file mode 100644 index 0000000..76eb155 Binary files /dev/null and b/C++/s5.exe differ diff --git a/C++/s6.cpp b/C++/s6.cpp index 736760a..30bb47e 100644 --- a/C++/s6.cpp +++ b/C++/s6.cpp @@ -1,5 +1,6 @@ // to find the largest sum of subarray #include +#include using namespace std; int maxSubArraySum(int a[], int size) @@ -15,4 +16,4 @@ int maxSubArraySum(int a[], int size) max_ending_here = max_so_far; } return max_so_far; -} +} \ No newline at end of file diff --git a/Web-Dev/css-is-awesome/initial.css b/Web-Dev/css-is-awesome/initial.css index 3bf343a..dd41264 100644 --- a/Web-Dev/css-is-awesome/initial.css +++ b/Web-Dev/css-is-awesome/initial.css @@ -7,8 +7,8 @@ body { .container { background: white; - width: 120px; - height: 200px; + width:auto; + height: auto; padding-inline: 0.3rem; font-size: 3rem; border-radius: 0.3rem; diff --git a/Web-Dev/flex-even-columns/initial.css b/Web-Dev/flex-even-columns/initial.css index 2e6d07a..d0c9737 100644 --- a/Web-Dev/flex-even-columns/initial.css +++ b/Web-Dev/flex-even-columns/initial.css @@ -31,6 +31,7 @@ section>p { .flex-even-columns { display: flex; gap: 2rem; + justify-content: space-between; } .flex-even-columns>* { diff --git a/Web-Dev/pseudo-elements/initial.css b/Web-Dev/pseudo-elements/initial.css index 59daeed..f002c9e 100644 --- a/Web-Dev/pseudo-elements/initial.css +++ b/Web-Dev/pseudo-elements/initial.css @@ -139,8 +139,9 @@ nav { transition: ease-in-out 200ms; } -.nav-link:hover::after { +.nav-link:hover { width: 100%; + text-decoration: underline; }