From b7a46c9431e065c5712379396fb46f30854efcb2 Mon Sep 17 00:00:00 2001 From: Nivedita-R Date: Thu, 29 Sep 2022 18:24:19 +0530 Subject: [PATCH 1/2] Create Hello.txt Create Hello.txt --- .../Getting Started/Hello.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt diff --git a/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt b/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt new file mode 100644 index 00000000..46b8938e --- /dev/null +++ b/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt @@ -0,0 +1 @@ +Nivedita Rai From 01fce850727e58436e6a47d7f144d7c895745b46 Mon Sep 17 00:00:00 2001 From: Nivedita-R Date: Tue, 4 Oct 2022 00:07:16 +0530 Subject: [PATCH 2/2] module1 my first module of programs --- .../Getting Started/Hello.txt | 1 - .../GettingStarted/CountDigitsInANumber.cpp | 18 +++++++++++ .../GettingStarted/GradingSystem.cpp | 22 +++++++++++++ .../GettingStarted/IsANumberPrime.cpp | 31 +++++++++++++++++++ .../GettingStarted/PrintAllPrimesTillN.cpp | 19 ++++++++++++ .../PrintFibonacciNumbersTillN.cpp | 19 ++++++++++++ .../GettingStarted/PrintZ.cpp | 29 +++++++++++++++++ 7 files changed, 138 insertions(+), 1 deletion(-) delete mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/CountDigitsInANumber.cpp create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/GradingSystem.cpp create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/IsANumberPrime.cpp create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/PrintAllPrimesTillN.cpp create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/PrintFibonacciNumbersTillN.cpp create mode 100644 IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/PrintZ.cpp diff --git a/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt b/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt deleted file mode 100644 index 46b8938e..00000000 --- a/IOT/Nivedita-R_NiveditaRai_2125it1079_2/Getting Started/Hello.txt +++ /dev/null @@ -1 +0,0 @@ -Nivedita Rai diff --git a/IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/CountDigitsInANumber.cpp b/IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/CountDigitsInANumber.cpp new file mode 100644 index 00000000..515488bd --- /dev/null +++ b/IOT/Nivedita-R_NiveditaRai_2125it1079_2/GettingStarted/CountDigitsInANumber.cpp @@ -0,0 +1,18 @@ +#include +#include +using namespace std; + +int main(){ + int n; + cin >> n; + if(n>=1 && n<=pow(10.0,9.0)){ + int d=0; + while(n!=0) + { + n=n/10; + d++; + } + cout< + +using namespace std; + +int main() +{ + int a; + cin>>a; + if(a>90) + cout<<"excellent"<80) + cout<<"good"<70 && a<=80) + cout<<"fair"<60 && a<=70) + cout<<"meets expectations"< +#include +using namespace std; +int main(){ + int t,i,j,n,c; + cin >> t; + if(t>=1 && t<=10000) + { + for (i=0;i>n; + if(n>=2 && n<=pow(10,9)) + { + + for(j=1;j<=n;j++) + { + if(n%j==0) + c++; + + } + if(c==2) + cout<<"prime"< +#include +using namespace std; +int main(int argc, char **argv){ + int low, high, i,j,c=0; + cin >> low >> high; + for(i=low;i<=high;i++) + {c=0; + for(j=2;j<=sqrt(i);j++) + { + if(i%j==0) + c++; + } + if(c==0) + cout< +using namespace std; + +int main(int argc, char **argv) +{ + int n,c; + cin >> n; + int a=0,b=1; + cout< + +using namespace std; + +int main() +{ + int i,j,k; + for(i=0;i<5;i++) + { + for(j=4;j>=0;j--) + { + if(i==0 || i==4) + cout<<"*"; + else + { + if(i==j) + cout<<"*"; + else + cout<<" "; + } + + } + cout<