Write a non-member function that shuffle-merge the nodes of
the two linked lists (list1 and list2) to First list, by taking nodes
alternately from the two lists such that the resultant list contains
distinct elements. Both lists contain unique elements each but can
have common elements. For example, if list1 contains {1 3 5 7}
and list2 contains {11 12 5 13 14}, then after the function call
shuffleMerge(list1,list2), list1 should contain
{1->11->3->12->5->13->7->14} and list2 should be empty now.
Note: You are NOT allowed to create any new node in this
function.
Construct a class named Complex to represent a complex number with the requirements:
The real and imaginary components are both floats
Function to input real components, virtual components from the keyboard
Function to display information to the screen
Function to take real components, function to assign real components
Function to get virtual components, function to assign virtual components
The function also takes real and imaginary components
The function simultaneously assigns real and imaginary components
Write a main program that illustrates how to use it(Only use if-else and nested if else in program)
Write a program which asks the user to open a bank account either Current or Savings. Your program will
display the following menu at the start:
Press 1 for Current Account
Press 2 for Savings Account
On the selection of account type, the user will open an account by providing an initial amount. In current account the initial amount for opening an account would be 2000 and for savings it would be 5000. After choosing the account type and opening the account with initial amount, your program will display the
following menu:
Press a for Deposit the money
Press b for withdrawing the money
In current account the user cannot withdraw more than 10000 rupees. In Savings account the user cannot withdraw more than 25000. When the user withdraws amount make sure that amount should not be more than the balance in account and at the end of withdrawal transaction, there should be
minimum of 500 rupees for each account.
Given an integer array of size n write a function that finds the maximum product of two integers in it.
Write a program using a for loop to display the cube of the numbers up to an integer entered by the user. Only a single for loop is required for this exercise.
Implement the code of Doubly Linked List.
Add your roll # node using Append function.
Add the last two digits of your contact # using Prepend function
Add your favorite digit between roll # and contact #.
And display the doubly linked list.
Write a program to find the number and sum of all integers between 0 till 200 which are divisible by 9. Only a single do-while loop is required for this exercise.
Write a program using a for loop to print the table of any given number till 10
Write a program with Student as abstract class and create derive classes Arts, Science from base class Student. Create the objects of the derived classes and process them and access them using array of pointer of type base class Student.
The factorial of a number is the function that multiplies the number by every natural number below it example 4! = 4*3*2*1 = 24
Write a code to find the factorial of a number given by the user