Write a function called foo_moo that takes a number as an argument and returns the following
statements according to the below mentioned conditions. Then, finally prints the statement in
the function call.
If the number is divisible by 2, it should return "Foo".
If the number is divisible by 3, it should return "Moo".
If the number is divisible by both 2 and 3, it should return "FooMoo".
Otherwise, it returns "Boo".
Write a python function that takes the limit as an argument of the Fibonacci series and prints till
that limit.
===================================================================
Function Call:
fibonacci(10)
Output:
0 1 1 2 3 5 8
===================================================================
Function Call:
fibonacci(5)
Output:
0 1 1 2 3 5
Write a function called even_checker that takes a number as an argument and prints whether
the number is even or odd inside the function.
===================================================================
Example 1:
Function Call:
even_checker(5)
Output:
Odd!!
===================================================================
Example2:
Function Call:
even_checker(2)
Output:
Even!!
Write a C++ menu driven in one a complete program which is consists/Have function, array, pointer and structure with at least more than three data members with their appropriate data types. Finally, all activity should be saved into word file. [all information should be filled from user]
Your program should do in the menu drive.
1. Return the number of frequency/count the duplication items from your program
2. Display the items as reverse order
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages
Write a program to read the value of base and exponents increase the power of base to exponents using FUNCTION and End FUNCTION
"Hello there"/10 output
Print all numbers between 1 to 1000 which are divisible by 7 and must not be divisible by 5
you are given a secret string and you are given a guess is string. both staying have exactly 5 characters. assume that each letters occurs at most one time in the secret string and guess string. some of the letters in the gas is string occurs in the same position as the secret string. call the number of such letters as i. some other letters in the guess string occurs in the secret but in some other position. call the number of such latter as j. you have to output (#)
Write the definition for a class called Distance that has data member feet as integer and inches as float. The class has the following member functions:
void set(int, float) to give value to object
void disp() to display distance in feet and inches
Distance add(Distance) to sum two distances & return distance
1. Write the definitions for each of the above member functions.
2. Write main function to create three Distance objects. Set the value in two objects and call add() to calculate sum and assign it in third object. Display all distances.