What is the time complexity T(n) of the following program? a) int n, d, i, j; cin >> n; for (d=1; d<=n; d++) for (i=1; i<=d; i++) for (j=1; j<=n; j += n/10) cout << d << " " << i << " " << j << endl; b) void main() { int n, s, t; cin >> n; for (s = 1; s <= n/4; s++) {t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } } c) void main() { int n, r, s, t; cin >> n; for (r = 2; r <= n; r = r * 2) for (s = 1; s <= n/4; s++) { t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } }
3 10583write a c program, using for loop, that accepts and odds two numbers. The output must be the sum and the addens. This should be repeated 5 times while the first number is decremented by one and the second number is incremented by 1.
2 92151.program to add any two objects using operator overloading 2.program to add any two objects using constructors 3.program to add any two objects using binary operator 4.program to add any two objects using unary operator
2 24337Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
5 16857. Write a program using two-dimensional arrays that computes the sum of data in tows and the sum of data in columns of the 3x3 (three by three) array variable n[3][3].
2 18006Post New IBM C++ Code Interview Questions
WHAT IS THE CURRENT CARRYING CAPACITY OF 2.5/3 CORE HI TUFF CABLE,WILL IT SAFLEY CARRY 8.6 AMPS OVER 120 METRES,CAN YOU ALSO ANSWER WITH FORMULA FOR WORKINGS OUT ,THANK YOU 3RDYR APPRENTICE.
How does Edge AI enhance data privacy and security?
What is the use of keyword with encryption.
What is aidl in Android?
What is difference between c and objective c?
For define what reason would an aluminum casting, when applied with a powder coated paint finish, cause a poor finish to the paintwork.
It is beneficial to create multiple ad groups in order to-?
How to do encapsulation in java?
How to clean the datastage repository?
What is blocking and nonblocking API in Node.js and how does it affect the architecture of your applications?
What is the function of the command- ec2-create-group create security group?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
Mention the validation tools used in SAS?
How do I fix werfault exe in windows 7?
How long can a macro variable be? A token? : sas-macro