Oddly Even TCS NQT Given a maximum of 100 digit numbers as input, find the difference between the sum of odd and even position digits. Input : 4567 Expected output: 2 Explanation Here, the sum of odd position digits 4 and 6 is 10. The Sum of even position digits 5 and 7 is 12. The difference is 12-10 = 2. Logic Take input as string hence you can check t…
Read moreEqualize the Array Code #include<bits/stdc++.h> using namespace std; int main() { int n,i,j,count=1,max=0; cin>>n; // input size of the array int a[n]; for(i=0;i<n;i++) // input array { cin>>a[i]; } for…
Read moreTaum & B'day Code #include<bits/stdc++.h> using namespace std; int main() { int t,i; cin>>t; // input no of test cases for(i=0;i<t;i++) { long int b,w,bc,wc,z,total; cin>>b>>w>>bc>>wc>>z; // taking input requirements if((bc+z)<wc) // if cost of purchasing a black g…
Read moreACM ICPC Team Code: #include<bits/stdc++.h> using namespace std; int main() { int n,i,m,j,k,max=0,count=0,ways=0; cin>>n>>m; // taking input number of attendee and topics string a[n]; for(i=0;i<n;i++) // taking input binary string { …
Read moreRepeated String Code #include<bits/stdc++.h> #include<string> using namespace std; int main() { long long int n,i,x,y,c=0; string s; cin>>s; // input string cin>>n; // input size or number of character for(i=0;i<s.size();i++) …
Read moreTCS NQT August 2021 Announced! Get Your Dream Job! Greetings mate! I have the happiest news of the hour for you. TCS has opened the registrations of the TCS National Qualifier Test for the August and November 2021 exams. Who can apply TCS NQT? How to apply TCS NQT? Where to apply for TCS NQT? Which NQT variant is perfect for you? I have answered all these q…
Read moreTop 10 frequently asked unique Accenture interview questions Which questions are most likely to be asked in Accenture interviews? How do I prepare for them? How can I give all the answers perfectly? How do I prepare all the questions in advance for my Accenture interview? If you are worried about your Accenture interview and have all these or similar questi…
Read more
tcs
Copyright © 2021 Coding Demons All Rights Reseved
Social Plugin