Write C++ that
(1)Convert the inputted 3-digit integer, the single digit to a hundred digit, and the hundreds digit to a single digit, and generate a new inverted number from the converted 3 digits.
(2) Arbitrary 3-digit integers are input by keyboard.
(3) When outputting the result, the required form is: original number: converted number.
4)run test the code in main
Create a program that will display magic square of numbers based on a given odd magic square size. A magic square is a square array of numbers consisting of the distinct positive integers 1,2, …, arranged such that the sum of the numbers in any horizontal, vertical, or main diagonal line is always the same number, known as the magic constant. The program should ask the user to enter an odd integer that will serve as the size of the square. The program should validate if the entered number is an odd or even number. If the number is even, the program should display an error message and ask the user to enter a number again. Once a valid size is entered, the program should automatically display the magic square.
1. Programming Problem I ( class, stack, array )
Given an array based stack of size N containing integers, tell whether it is a palindrome or not.
For example
Input: N=3
Value [ ]={1,2,1}
Output: 1
1. Programming Problem I ( Singly Linked List)
Given a singly linked list of size N, the task is to left-shift the linked list by k nodes where k is the given positive integer smaller than or equal to the length of linked list.
For example:
Input: N=5
2-> 4-> 7-> 8-> 9
K=3
Output: 8-> 9-> 2-> 4-> 7
Programming Problem I ( class, queue, Linked list )
Given a collection of integers, how do you check whether each successive pair of numbers in the collection is consecutive or not. The pairs can be increasing or decreasing.
For example, if the collection of elements are [4, 5, -2, -3, 11, 10, 6, 5] then the output should be true because each of the pairs (4, 5), (-2, -3), (11, 10), and (5, 6) consists of consecutive numbers. But if collection is [4,6,9,8] it should return false.
Programming Problem I ( class, stack, Linked list )
You are required to find out whether the number entered by user have length even or odd. You cannot use the modulus function, modulus operator or length function
Programming Problem I ( Singly Circular Linked List)
We are given a pointer to the first element of a linked list L. There are two possibilities for L, either it ends (snake) or it points back to head of the list (snail). Give a function that tests whether given list it is a snake or a snail.
Suppose there are two singly linked lists both of which intersect at some point and become a single linked list. The head or start pointers of both the lists are known, but the intersecting node is not known. Also, the number of nodes in each of the lists before they intersect is unknown and may be different in each list.
For example, List 1 may have 11 nodes before it reaches the intersection point, and List 2 might have 111 nodes before it reaches the point of intersection where 111 and 11 may be m = 11, 111 < 11 or 111 > 11. Give an algorithm for finding the merging point.
I want you to make a array of numbers for me. All you have to do is make a program that will let me input any random integer in one line. Afterwards, it will then print out all the numbers I've inputted, on separate lines.
Ask user enter number 0-9 and make value of that index
null of above array