Instructions:
Input
1. An integer
Output
The first line will contain a message prompt to input the integer.
The second line contains the largest digit of the integer.
Enter·n:·214
Largest·digit·=·4Instructions:
Input
1. An integer
Output
The first line will contain a message prompt to input the integer.
The succeeding lines contain the digits of the integer.
Enter·n:·214
4
1
2Input
1. An integer
Output
The first line will contain a message prompt to input the integer.
The succeeding lines contain the odd numbers.
Enter·n:·10
9
7
5
3
1Write a program to display the multiplication table of the input number.
Midterm Exam
Do the following by using Recursion:
1. Create a code that can print any numbers depending on the inputted value of the user in ascending then reverse it in descending order.
Sample output:
Enter number: 5
1
2
3
4
5
4
3
2
1
2. Write a code that will identify if the inputted value is odd or even. If it is odd then get the sum of all the odd numbers prior to the inputted value, same goes if it is even then get the sum of all the even numbers.
Sample output:
Enter number: 9
Odd
The sum is: 25
3. Using the fibonacci sequence, create a code that will print the remainder using %5 of the sum of the 2 added value depending on the input term of the user.
Sample output:
Enter 1st term: 5
Enter 2nd term: 6
The sum is: 13
The remainder is: 3
by CodeChum Admin
It's time to find out if something is true or false. Let's test your capabilities by creating a program that checks if two integers are equal!
Instructions:
Input
1. First integer
2. Second integer
Output
The first two lines will contain message prompts to input the two integers.
The next line will contain the inputted integers.
The last line will contain a string which is the result, if the condition were true.
Create a program based on the attached output using a for loop.
Output:
Enter hidden number: 50
Set of how many attempts to allow the user to guess: 5
Enter your guess number: 45
Sorry! Your guessed number is lesser than the hidden number.
You have 4 attempts left.
Enter your guess number: 51
Sorry! Your guessed number is greater than the hidden number.
You have 3 attempts left.
Enter your guess number: 10
Sorry! Your guessed number is lesser than the hidden number.
You have 2 attempts left.
Enter your guess number: 17
Sorry! Your guessed number is lesser than the hidden number.
You have 1 attempts left.
Enter your guess number: 49
Sorry! Your guessed number is lesser than the hidden number.
You have 0 attempts left.
Sorry you failed to guess the number please try again later.
Write a program to calculate the sum of the following series:
1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + ... + 1/20by CodeChum Admin
Make me a program that accepts a size of the character array and its values. Then, count the number of uppercase vowels that are in it.
Easy, right? Then go and code as if your life depends on it!
Tip: After your scan for the size, add a space after the placeholder like this so that the newline character directly after the number won't be scanned as one of the characters:
scanf("%d ", &size);Input
1. Size of the array
2. Characters of the array
Output
The first line will contain a message prompt to input the size of the array.
The second line will prompt to input the characters of the array.
The last line contains the count of the uppercase vowels.
Enter·the·size·of·the·array:·19
CodeChum·is·AWEsome
Count·=·2