1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Troyanec [42]
3 years ago
15

Write a loop that asks the user to enter a number. the loop should iterate 10 times and keep a running total of the numbers ente

red.
Computers and Technology
1 answer:
Blababa [14]3 years ago
6 0
int sum = 0;
int number;
for (int i=0; i<10; i++) { 
   printf("Enter an integer number: ");
   scanf_s("%d", &number);
   sum += number;
}

printf("The sum is %d", sum);

You might be interested in
PrimeFactorization.java: Write a program that begins by reading in a series of positive integers on a single line of input and t
Mkey [24]

Answer:

See attached file for detailed code.

Explanation:

See attached file.

Download txt
3 0
3 years ago
What is the relationship between ionic bonds and cleavage
Marrrta [24]
Hello there!

The relationship between ionic bonds and cleavage is: As the ionic bond strength increases, cleavage will be more difficult. 

Minerals are held together generally by ionic bonds. Ionic bonds are the result of electrostatic attraction and electron transfer between positive and negative ions (cations and anions). Ionic bonding implies the formation of ordered crystalline solids and the cleavage of those solids will depend on the strength of this bonding. 
7 0
3 years ago
Write function d2x() that takes as input a nonnegative integer n (in the standard decimal representation) and an integer x betwe
Rufina [12.5K]

Answer:

The function in Python is as follows:

def d2x(d, x):

   if d > 1 and x>1 and x<=9:

       output = ""

       while (d > 0):

           output+= str(d % x)

           d = int(d / x)

       output = output[::-1]

       return output

   else:

       return "Number/Base is out of range"

Explanation:

This defines the function

def d2x(d, x):

This checks if base and range are within range i.e. d must be positive and x between 2 and 9 (inclusive)

   if d >= 1 and x>1 and x<=9:

This initializes the output string

       output = ""

This loop is repeated until d is 0

       while (d > 0):

This gets the remainder of d/x and saves the result in output

           output+= str(d % x)

This gets the quotient of d/x

           d = int(d / x) ----- The loop ends here

This reverses the output string

       output = output[::-1]

This returns the output string

       return output

The else statement if d or x is out of range

<em>    else:</em>

<em>        return "Number/Base is out of range"</em>

<em />

4 0
3 years ago
Apart from the OOPs concepts learned in this lesson, identify additional concepts and write an essay on their functions. Explain
patriot [66]

Explanation:

Object Oriented Programming (OOPS or OOPS for Object Oriented Programming System) is the most widely used programming paradigm today. While most of the popular programming languages are multi-paradigm, the support to object-oriented programming is fundamental for large projects. Of course OOP has its share of critics. Nowadays functional programming seems the new trendy approach. Still, criticism is due mostly to misuse of OOP.

6 0
3 years ago
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
AveGali [126]

Answer:

I think it the answer will be 0,1,2,3,4

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • The contents of an array of type ______ can be displayed with the cout operator (without specifying an element). - 1 point(s)
    14·1 answer
  • The code segment below uses the procedure IsPartOf (list, item), which returns true if item appears in list and returns false ot
    13·1 answer
  • Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of
    7·1 answer
  • What is the financial aspect for a business as to what database software they will buy?
    6·1 answer
  • How can an administrator make only the files and folders to which a user has at least Read permissions visible?
    13·1 answer
  • Which of these is an aggregator?
    9·2 answers
  • The model for Diminishing Marginal Utility is ______ in nature.
    12·1 answer
  • You manage a network that uses switches. In the lobby of your building, there are three RJ45 ports connected to a switch. You wa
    5·1 answer
  • Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtm/​
    5·2 answers
  • Create a Python program that computes the cost of carpeting a room. Your program should prompt the user for the width and length
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!