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

Write a c program to prompt the user to enter 3 integers namely: temp ,tent ,teep as variables names .The program should compare the integers and display the cube of the smallest.

Groupings

by CodeChum Admin

Did you know that you can also reverse lists and group them according to your liking with proper code? Let's try it to believe it.


Instructions

  1. Create a variable that accepts a positive odd integer.
  2. Create an empty list. Then, using loops, add random integer values into the list one by one. The number of values to be stored is dependent on the inputted odd integer on the first instruction.
  3. Reverse the order of the list. Then, print out the list's new order in this manner:
  4. [first-half values]-[middle value]-[second-half values], just like that of the sample output. Make use of list slicing that you’ve learned from the past lessons to easily achieve this segment.

Input

The first line contains an odd positive integer.

The next lines contains an integer.

5
1
3
4
5
2

Output

A line containing a list.

[2,5]-[4]-[3,1]

Cubes and Squares

by CodeChum Admin

You can also make a list of numbers, ey? Let's go and have some fun in tweaking the values of each element, but let's give it some twist to add on some fun to the code.

Let's have a go at it!

Instructions:

  1. An array containing 40 integer elements is already provided for you in the code editor below.
  2. Using loops and conditions, print out the cube of the array element if it is a positive number, and print out the square of the number if it is negative. Each result must be printed out separately by each line.

Instructions

  1. A list containing 5 integer elements is already provided for you in the code editor below.
  2. nums = [-2, -1, 1, 2, 3]
  3. Using loops and conditions, print out the cube of the list element if it is a positive number, and print out the square of the number if it is negative. Each result must be printed out separately by each line.

 

Output

The squares and cubes of the elements in the array.

4

1

1

8

27

.

.

.


A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 5 to the digit and getting the remainder after dividing the new value by 8. Then swap the first digit with the third, and swap the second digit with the fourth. Then print the encrypted integer. Write a separate application that inputs an encrypted
A rectangle is 4 times as long as it is wide. If the length is increased by 4 inches and the width is decreased by 1 inch, the area will be X_AREA square inches. If X_AREA is entered by the user, create a program that will determine what were the dimensions (length and width) of the original rectangle?

Using a do-while loop create a program that will prompt the user for a number and then print out a list 5 odd numbers above the given number(inclusive).

Sample Run1

Enter a number: 10

Output1: 11 13 15 17 19

Sample Run2

Enter a number: 5

Output2: 5 7 9 11 13

input price & quantity.if net price is greater than 10000 the discount is 10%.if we enter -1 as the price then the code must stop and calculate the net price


Your task is to create a program that can achieve the above requirements when given the students surname, first name and three digit postfix through CMD arguements


Create structure of Student with following data members Name Reg No CGPA Email ID Create array of 30 students in main function and provide following functionalities Initializing Students Inserting new Student Updating particular student record Deletion of particular student Searching of particular student Sorting all student
Maximillian is the chief commander of the Great Greek Army and he is leading his forces into a crucial war with Spain. If all the enemy soldiers stand in a straight line incrementally marked starting from position 1, and a particular soldier at position i dies, the soldiers at position 21 and 21+1 die as well. This happens in a cascading manner and so, a major part of troops can be killed by just killing one person. By retrospection, Maximillian realize that this also means that if the soldier marked 1 (standing at the head of the troops) is killed and then the entire army is Input Specification: input1: N, number of soldiers in the enemy camp input2: K, number of soldiers to be killed input3: An array of soldiers numbered between 1 to N who will be killed sequentially in the mentioned order 9 10 Output Specification: Return an array of numbers that belong to soldiers who are alive at the end (in increasing order). If all are dead, then return (0) 12 13 15 16
LATEST TUTORIALS
APPROVED BY CLIENTS