From c182d45964a7ea3e10fb2fb9c888a59e24792cc6 Mon Sep 17 00:00:00 2001 From: hka <151080996+Priyanka-Kri6a@users.noreply.github.com> Date: Tue, 27 Jan 2026 18:32:43 +0530 Subject: [PATCH 1/4] Q1 of 100 questions by Priyanka --- Q1.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Q1.cpp diff --git a/Q1.cpp b/Q1.cpp new file mode 100644 index 0000000..09622a9 --- /dev/null +++ b/Q1.cpp @@ -0,0 +1,16 @@ +#include +using namespace std; + +int main() +{ + int num = 96; + + if (num > 0) + cout << "The number is positive"; + else if (num < 0) + cout << "The number is negative"; + else + cout << "Zero"; + + return 0; +} From 738e11837645dd67bcaea6034f3d782b72b64dbf Mon Sep 17 00:00:00 2001 From: hka <151080996+Priyanka-Kri6a@users.noreply.github.com> Date: Sat, 31 Jan 2026 12:42:05 +0530 Subject: [PATCH 2/4] Q2 and Q3 of 100 questions by Priyanka --- Q1.cpp | 14 +++++--------- Q2.cpp | 8 ++++++++ Q3.cpp | 12 ++++++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 Q2.cpp create mode 100644 Q3.cpp diff --git a/Q1.cpp b/Q1.cpp index 09622a9..35878d9 100644 --- a/Q1.cpp +++ b/Q1.cpp @@ -2,15 +2,11 @@ using namespace std; int main() -{ - int num = 96; - - if (num > 0) - cout << "The number is positive"; - else if (num < 0) - cout << "The number is negative"; - else - cout << "Zero"; +{ int num; + cout<<"Enter the Number: ; + cin>>num; + if(num == 0) + cout << "Zero"; else (num > 0) ? cout << "Positive": cout << "Negative"; return 0; } diff --git a/Q2.cpp b/Q2.cpp new file mode 100644 index 0000000..2b957b2 --- /dev/null +++ b/Q2.cpp @@ -0,0 +1,8 @@ +#include +using namespace std; +int main() { + int num; + cout<<"Enter the number: "; + cin>>num; + num%2==0?cout<<"Even Number!!":cout<<"Odd Number!!"; +} diff --git a/Q3.cpp b/Q3.cpp new file mode 100644 index 0000000..2e11222 --- /dev/null +++ b/Q3.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; +int main() { + int num; + cout<<"Enter the number: "; + cin>>num; + int sum=0; + for(int i=0;i Date: Tue, 3 Feb 2026 20:33:44 +0530 Subject: [PATCH 3/4] Q4 and Q5 of 100 by Priyanka --- Q4.cpp | 12 ++++++++++++ Q5.cpp | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 Q4.cpp create mode 100644 Q5.cpp diff --git a/Q4.cpp b/Q4.cpp new file mode 100644 index 0000000..04a274f --- /dev/null +++ b/Q4.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; +int main() { + int l,u; + cin>>l>>u; + int sum=0; + for(int i=l;i<=u;i++){ + sum+=i; + } + cout<<"Sum of numbers in range: "< +using namespace std; +int main() { + int first_num,sec_num; + cin>>first_num>>sec_num; + int res = first_num>sec_num?first_num:sec_num; + cout<<"Greatest of two numbers is: "< Date: Fri, 6 Feb 2026 16:52:13 +0530 Subject: [PATCH 4/4] Q6 and Q7 of 100 questions by Priyanka --- Q6.cpp | 18 ++++++++++++++++++ Q7.cpp | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Q6.cpp create mode 100644 Q7.cpp diff --git a/Q6.cpp b/Q6.cpp new file mode 100644 index 0000000..451d16f --- /dev/null +++ b/Q6.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; +int main() { + int x,y,z; + cin>>x>>y>>z; + cout<<"The greatest of the three numbers is: "; + if(x>y){ + if(x>z) + cout<z) + cout< +using namespace std; +int main() { + int year; + cin>>year; + if(year%400==0 || year%4==0 && year%100!=0) + cout<<"Leap year!"; + else + cout<<"Not a leap year!"; +}