From 0e69d153f31205c0225ca169d9980a2b368aec46 Mon Sep 17 00:00:00 2001 From: tansin25 Date: Thu, 29 Sep 2022 18:24:26 +0530 Subject: [PATCH 1/6] Create Tansin.txt --- .../GettingStarted/Tansin.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/Tansin.txt diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/Tansin.txt b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/Tansin.txt new file mode 100644 index 00000000..e9d12217 --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/Tansin.txt @@ -0,0 +1 @@ +Sab moh maya hai From 0329f3c7f992d7a71e0029c74238a241a4fcf4af Mon Sep 17 00:00:00 2001 From: tansin25 Date: Mon, 3 Oct 2022 23:36:35 +0530 Subject: [PATCH 2/6] createdPrintZ.cpp First code --- .../GettingStarted/PrintZ.cpp.txt | 10 ++++++++++ .../GettingStarted/Tansin.txt | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt delete mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/Tansin.txt diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt new file mode 100644 index 00000000..fb53f9a2 --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt @@ -0,0 +1,10 @@ +#include +using namespace std; +int main(int argc, char** agrc) { + cout<<("*****")< Date: Mon, 3 Oct 2022 23:53:11 +0530 Subject: [PATCH 3/6] createdPrintZ My first code --- .../GettingStarted/{PrintZ.cpp.txt => PrintZ.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/{PrintZ.cpp.txt => PrintZ.cpp} (100%) diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp similarity index 100% rename from IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp.txt rename to IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintZ.cpp From 1ff524ae4fcb8d9125515ae0b3d76b3f22b41d1c Mon Sep 17 00:00:00 2001 From: tansin25 Date: Tue, 4 Oct 2022 00:27:55 +0530 Subject: [PATCH 4/6] createGradingSystem.cpp grading system code --- .../GettingStarted/GradingSystem.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/GradingSystem.cpp diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/GradingSystem.cpp b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/GradingSystem.cpp new file mode 100644 index 00000000..fb1fef24 --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/GradingSystem.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; +int main(int argc, char**argv){ + int marks; + cin>>marks; + if(marks>90){ + cout<<"excellent"<80&&marks<=90) + cout<<"good"<70&&marks<=80) + cout<<"fair"<60&&marks<=70) + cout<<"meets expectations"< Date: Tue, 4 Oct 2022 22:20:47 +0530 Subject: [PATCH 5/6] MoreOfGettingStarted 5 more solutions of getting started --- .../GettingStarted/CountDigitsInANumber.cpp | 12 ++++++++++ .../GettingStarted/IsANumberPrime.cpp | 21 +++++++++++++++++ .../GettingStarted/PrintAllPrimesTillN.cpp | 23 +++++++++++++++++++ .../PrintFibonacciNumbersTillN.cpp | 15 ++++++++++++ .../GettingStarted/ReverseANumber.cpp | 13 +++++++++++ 5 files changed, 84 insertions(+) create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/CountDigitsInANumber.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/IsANumberPrime.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintAllPrimesTillN.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintFibonacciNumbersTillN.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/ReverseANumber.cpp diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/CountDigitsInANumber.cpp b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/CountDigitsInANumber.cpp new file mode 100644 index 00000000..4a9ef246 --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/CountDigitsInANumber.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; + +int main(int argc, char **argv){ + int n,count=0; + cin >> n; + while(n!=0){ + n=n/10; + count++;} + cout< +using namespace std; +int main(int argc, char **argv){ + int t,n; + cin >> t; + for (int i = 0; i < t; i++){ + cin >> n; + int c = 2; + while (c*c <= n){ + if (n%c == 0) + break; + c++; + } + if (c * c > n){ + cout << "prime" << endl; + } + else{ + cout << "not prime" << endl; + } + } +} \ No newline at end of file diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintAllPrimesTillN.cpp b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintAllPrimesTillN.cpp new file mode 100644 index 00000000..465ca7ad --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/GettingStarted/PrintAllPrimesTillN.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int main(int argc, char **argv){ + int low, high,i,j,c; + cin >> low >> high; + for(i=low;i<=high;i++) +{ + if(i==1||i==0) + continue; + c=1; + for(j=2;j<=i/2;j++) + { + if(i%j==0) + { + c=0; + break; + } + } +if(c==1) +cout< +using namespace std; + +int main(int argc, char **argv) +{ + int n,a=0,b=1,c; + cin >> n; + for(int i=0;i +using namespace std; + +int main(int argc, char **argv){ + int n,c; + cin >> n; + while(n!=0){ + c=n%10; + cout< Date: Mon, 10 Oct 2022 23:19:34 +0530 Subject: [PATCH 6/6] Patterns Patterns module --- .../Patterns/Pattern1.cpp | 14 ++++++++++ .../Patterns/Pattern2.cpp | 15 +++++++++++ .../Patterns/Pattern3.cpp | 20 ++++++++++++++ .../Patterns/Pattern4.cpp | 23 ++++++++++++++++ .../Patterns/Pattern5.cpp | 26 +++++++++++++++++++ 5 files changed, 98 insertions(+) create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern1.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern2.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern3.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern4.cpp create mode 100644 IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern5.cpp diff --git a/IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern1.cpp b/IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern1.cpp new file mode 100644 index 00000000..9bdd6f92 --- /dev/null +++ b/IOT/tansin25_TanmaySingh_2125csit1072_2/Patterns/Pattern1.cpp @@ -0,0 +1,14 @@ +#include +using namespace std; + +int main(int argc, char **argv){ + int n; + cin >> n; + + for(int i=1;i<=n;i++){ + for(int j=1;j<=i;j++){ + cout<<"*\t"; + }cout< +using namespace std; + +int main(int argc, char **argv){ + int n; + cin >> n; + for(int i=n;i>=1;i--){ + for(int j=1;j<=i;j++){ + cout<<"*\t"; + }cout< +using namespace std; + +int main(int argc, char **argv){ + int n; + cin >> n; + for(int i=1;i<=n;i++) + { + for(int j=1;j<=n;j++) + { + if(j>=n+1-i) + cout<<"* "; + else + cout<<" "; + } + cout< +using namespace std; + +int main(int argc, char **argv){ + int n; + cin >> n; + + for(int i=n;i>=1;i--) + { + for(int j=1;j<=n;j++) + { + if(j>=n+1-i) + cout<<"* "; + else + cout<<" "; + } + cout< +using namespace std; + +int main(int argc, char **argv){ + int n; + cin >> n; + int s=n/2,a=1; +for(int i=1;i<=n;i++){ + for(int j=1;j<=s;j++){ + cout<<("\t"); + } + for(int j=1;j<=a;j++){ + cout<<("*\t"); + } + cout<