diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..0cba2e6834fb66c3e0efef2684351d81ef47c4b3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "iostream": "cpp" + } +} \ No newline at end of file diff --git a/task2 b/task2 new file mode 100755 index 0000000000000000000000000000000000000000..fd5872be47152f3f79d301a726aa367f0667eb6b Binary files /dev/null and b/task2 differ diff --git a/task2.cpp b/task2.cpp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3f03488a627da9d61fa99c4eb37b60d30c53d5a6 100644 --- a/task2.cpp +++ b/task2.cpp @@ -0,0 +1,8 @@ +#include <cstdio> + +int main() { + for (int i = 0; i < 10; i++) { + printf("My name is Vikram. My Student id is :- 23069984. \n"); + } + return 0; +} diff --git a/task3 b/task3 new file mode 100755 index 0000000000000000000000000000000000000000..58ca71aaeab997160236b00bf4017b25bb6179e0 Binary files /dev/null and b/task3 differ diff --git a/task3.cpp b/task3.cpp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..aecd215ca79b2b1f6ac834124c61d98e40f75175 100644 --- a/task3.cpp +++ b/task3.cpp @@ -0,0 +1,13 @@ +#include <cstdio> +#include <cstring> + +int main() { + char name[50]; + printf("Please enter your name: "); + scanf("%s", name); + + printf("Hello, %s!\n", name); + + return 0; +} + diff --git a/task4 b/task4 new file mode 100755 index 0000000000000000000000000000000000000000..8d83f27e3aeb3dccb30fb1c1f82b05dc5fcd1a66 Binary files /dev/null and b/task4 differ diff --git a/task4.cpp b/task4.cpp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bfee43591602f9959c6b71181d9bb29f1ac5e813 100644 --- a/task4.cpp +++ b/task4.cpp @@ -0,0 +1,12 @@ +#include <cstdio> +#include <iostream> +using namespace std; + +int main() { + int n; + cin >> n; + for(int i = 0; i < n ; i++){ + printf("Print this statement %d times \n" , i ); + } + return 0; +} \ No newline at end of file diff --git a/task5 b/task5 new file mode 100755 index 0000000000000000000000000000000000000000..4630749a8fea104a35c388b091f324f9fbec9560 Binary files /dev/null and b/task5 differ diff --git a/task5.cpp b/task5.cpp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a6cdb7be0181f00accdea3961ce553fc647c2275 100644 --- a/task5.cpp +++ b/task5.cpp @@ -0,0 +1,15 @@ +#include <cstdio> + +int main() { + for (int i = 0; i <= 30; i++) { + if (i % 3 == 0) { + printf("fizz\n"); + } else if (i % 5 == 0) { + printf("buzz\n"); + } else { + printf("%d\n", i); + } + } + + return 0; +}