Questions: 1 978

Answers by our Experts: 1 850

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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:

  1. Input a non-zero positive integer.
  2. Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
  3. Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
  4. Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.

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:

  1. Input two integer values. The first one shall accept any integer from 0-9 and the other one shall take a non-zero positive integer.
  2. Using a while loop, count how many of the first integer (0-9) is present in the digits of the second inputted integer and print the result (see sample input and output for example).
  3. Tip #1: You have to use your knowledge from the previous problems in looping through the digits of a number: % 10 to get the rightmost digit, while / 10 to remove the rightmost digit. Make sure to solve the previous problems first.

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

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS