From 6f0e41410a0cce7c4930b3120cf0779d7300d4aa Mon Sep 17 00:00:00 2001 From: Shivam9060 <103112893+Shivam9060@users.noreply.github.com> Date: Mon, 30 May 2022 20:49:01 +0530 Subject: [PATCH 1/2] Create q1.cpp --- q1.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 q1.cpp diff --git a/q1.cpp b/q1.cpp new file mode 100644 index 0000000..388bfa0 --- /dev/null +++ b/q1.cpp @@ -0,0 +1,30 @@ +-#include +#include +using namespace std; + +int main(){ + string name; + cin>>name; + int length=name.length(); + int n; + int x; + cin>>n>>x; + string shift=""; + for(int i=0;i=0;i--){ + char temp; + temp=shift[i]; + shift[i]=shift[i-1]; + shift[i-1]=temp; + } + } + cout< Date: Mon, 30 May 2022 20:50:43 +0530 Subject: [PATCH 2/2] Create q2.cpp --- q2.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 q2.cpp diff --git a/q2.cpp b/q2.cpp new file mode 100644 index 0000000..db09977 --- /dev/null +++ b/q2.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int main(){ + int m; + cin>>m; + for(int i=0;i>a>>b>>c>>x; + int ans=a*x+b*x+c; + int arr[10]={6,2,5,5,4,5,6,3,7,6}; + int n=0; + while(ans>0){ + int temp=ans%10; + for(int i=0;i<10;i++){ + if(i==temp){ + n+=arr[i]; + } + } + ans=ans/10; + } + cout<