Write a program that print in screen a tree with its height
taken from user by entering number of 4 digits and find
the odd numbers then calculate the sum of odd numbers so he
get the height of tree?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ Code Interview Questions

Coin Problem You are given 9 gold coins that look identical. One is counterfeit and weighs a bit greater than the others, but the difference is very small that only a balance scale can tell it from the real one. You have a balance scale that costs 25 USD per weighing. Give an algorithm that finds the counterfeit coin with as little weighting as possible. Of primary importance is that your algorithm is correct; of secondary importance is that your algorithm truly uses the minimum number of weightings possible. HINT: THE BEST ALGORITHM USES ONLY 2 WEIGHINGS!!!

1 Answers   Motorola, Qatar University,


#include<iostream.h> //main() //{ class A { friend class B; public: void read(); }; class B { public : int a,b; }; void A::read() { cout<<"welcome"; } main() { A x; B y; y.read(); } In the above program......, as B is a friend of A B can have access to all members,i cant access y.read . could you please tell me the reason and what would i code to execute this program?

2 Answers  


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

0 Answers   Satyam,


write a program that can LOCATE and INSERT elements in array using c++ programming languages.

0 Answers  


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

0 Answers   Nagarro,






1+1/2!+1/3!+...+1/n!

0 Answers  


a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.. ""EXAMPLE"" enter how many numbers to be inputted: 5 12 14 11 09 30 what number to search: 11 11 IS FOUND IN LOCATION 3 PLZZZ.. ELP ME...

3 Answers  


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation

0 Answers   HCL,


What will be the output- for(i=1;i<=3;i++) { printf("%d",i); continue; i++; }

5 Answers   Impetus,


write a program to convert temperature from fa height into celcius and vise versa,use modular programming

0 Answers   Jomo Kenyatta University,


write a program that reads a series of strings and prints only those strings begging with letter "b"

0 Answers  


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

0 Answers   Wipro,


Categories