We've already made arraying/listing the easy way, but how about arraying/listing and printing the list in reverse order?
Make a program that will input an integer and then using loops, add items on an array/list one by one for the same number of times as that of the first inputted integer. Then, print out the array/list in reverse order, that is, starting from the last item on the array/list down to the first one, each in separated lines.
Input
1. Size of the array
2. Elements of the array
Output
The first line will contain a message prompt to input the size of the array.
The succeeding lines will contain message prompts to input the elements of the array.
The next lines will contain the elements of the array in reversed order.
Enter·the·size:·5
Element·#1:·1
Element·#2:·64
Element·#3:·32
Element·#4:·2
Element·#5:·11
Reversed·Order:
Element·#1:·11
Element·#2:·2
Element·#3:·32
Element·#4:·64
Element·#5:·1
How to print triple slash in codechum
“If the height of a tree is reduced and balanced, then the searching time
also get reduced.” (True/ False) Justify. Construct a B-tree of order three with
the following set of elements where the elements are added to the tree one
after the other in the given sequence.23, 64, 48, 96, 101, 34, 55, 11, 22, 41,
89, 71, 78, 61, 83, 94, 8, 27, 35, 1.
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Create a program like seme-seme program with at least 10-20 questions. The program would interact with the user some important details about the user.
To give you more of a challenge with a number's digits, let's try counting how many of a certain digit is present on a given number.
Let's start coding!
Instructions:
Create a C program about simple chat conversation (at least 10-20 questions)
Find latitude and longitude of first 20 countries with a population greater than or equal to the population limit given below. Use the country details from this dataset.
Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.
Assume radius of earth: 6371 km
Round length of each line and final result to 2 decimal points
If co-ordinates are missing for any country use 0.000 N 0.000 E
Population limit: 2072
Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting
The students of Dr. Kyle have submitted an unique string that Dr. Kyle gave them for homework. He is checking the strings of student A and student B which are denoted as and . Dr. Kyle wants to find out if they copied each other's work. If the string can be transformed into string with rotations, it'll be obvious to Dr. Kyle that they have cheated.
Write a C program to check whether the given number is equal or not equal using if, if else