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
vampirchik [111]
3 years ago
9

Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to

the user. Just write the code segment to show what is asked, not a complete program. However, declare any variables that you need to use. Use a semicolon (;) at the end of each line of code so I can tell when you use a new line in your code.
Computers and Technology
1 answer:
PSYCHO15rus [73]3 years ago
6 0

Answer:

Explanation:

The following loop code is written in Java and asks the user for the 6 integer numbers as mentioned in the question and sums them up. Finally putting them into a variable named total and printing it out.

       int total = 0;

       for (int x = 0; x < 6; x++) {

           Scanner in = new Scanner(System.in);

           System.out.println("Enter an integer: ");

           total += in.nextInt();

       }

       System.out.println("Your total is: " + total);

You might be interested in
How do you change your brainly lvl, it says I'm in collage but I'm in 8th grade :(
olga2289 [7]

Answer:

Awww

Explanation:

6 0
3 years ago
Read 2 more answers
As part of its commitment to sustainability, a company is looking for a way to track the source of purchased goods and how they
luda_lava [24]

The primary technology that would enable the company to achieve this goal is Blockchain technology

  • Blockchain is commonly defined as an enclosed, encrypted, distributed database that is distributee in a wide range of multiple computers or nodes that are part of a community or system.

  • It is an exciting technologies as it helps to limit the incidence of security breaches by even its own users.

  • With Blockchain, a company can be able to guard against thefts of their products and also monitor them.

From the above we can therefore say that the answer to The primary technology that would enable the company to achieve this goal is Blockchain technology is correct

Learn more from:

brainly.com/question/24875333

6 0
3 years ago
Read 2 more answers
Write down the result of each expression in the output column and specify the datatype of the result.Datatype should follow the
sergiy2304 [10]

Answer:

Kindly check the explanation section.

Explanation:

Below are the expression given in the question and the corresponding output and Datatype.

(1). Expression = 7/2 + 9.2/2.

Output = 7.6, Datatype = double

(2). Expression = 3.4 + 2 5 f.

Output = 5.9, Datatype = double.

(3). Expression = "whale" . Substring (2,5).

Output = "ale" , Datatype = string.

(4). Expression= (int) 9.2 + 6.0 f.

Output = 15.0 f, Datatype = float.

(5). Expression = (2 <= 1) && (5! = 2) || (8 + 5!= 13).

Output = false, Datatype = boolean

(6) Expression =1.5 f == 1.5?.

Output: “false” , Datatype : “true ”

Output = “false”,

Datatype= String.

(7). Expression = “joey”.charAtt(4).

Output = error, Datatype = error“.

(8). Expression = madmax”.

indexOf(“a”) + 7.

Output: 8 , Datatype = int.

(9). Expression = 2 + 3 + “catdog” + 1 + 2.

Output = “5catdog12”, Datatype = String.

(10). Expression = String.format(“%3.3f”,7.89672).

output = “7.897”, datatype = String.

(11). Expression = “captain”.indexOf(“a”, 2).

Output = 4, datatype = int.

(12). true ? ++3: 3++.

Output = error, dataty = error.

(13). Expression = new String[]{“tony”,“josh”}[0].

Output = “tony”, Datatype = String.

(14). Expression = “patrick”.substring(2) +“lucky”.substring(4).

Output = “tricky”, Datatype = String.

(15). Expression = “popFizz”.indexOf(“o”) + 2.4+ 6L.

Output9.4, Datatype = double.

(16). Expression = “pizza”.indexOf(“z”).

Output = 2, Datatype = int.

3 0
3 years ago
Lee finishes entering all the data. Next, he wants to format the header row so it is easier to read and stands out from the rest
dangina [55]

Answer:

A: Add shading to the top row

B: Change the style of the table

Explanation:

Just got the question myself and got the answer from it

6 0
3 years ago
Write an HLA Assembly language program that prompts for a specific int8 value named n and then displays a repeated digit pattern
yan [13]

Answer:

Output:

123456

123456

123456

123456

123456

123456

Explanation:

C Code:

#include <stdio.h>

int main() {

int n,i,j;

printf("Gimme a decimal value to use as n:");

scanf("%d",&n);

for(i=0;i<n;i++){

for(j=1;j<=n;j++){

printf("%d",j);

}

printf("\n");

}

return 0;

}

Equivalent assembly program:

.LC0:

.string "Gimme a decimal value to use as n:"

.LC1:

.string "%d"

main:

push rbp

mov rbp, rsp

sub rsp, 16

mov edi, OFFSET FLAT:.LC0

mov eax, 0

call printf

lea rax, [rbp-12]

mov rsi, rax

mov edi, OFFSET FLAT:.LC1

mov eax, 0

call scanf

mov DWORD PTR [rbp-4], 0

.L5:

mov eax, DWORD PTR [rbp-12]

cmp DWORD PTR [rbp-4], eax

jge .L2

mov DWORD PTR [rbp-8], 1

.L4:

mov eax, DWORD PTR [rbp-12]

cmp DWORD PTR [rbp-8], eax

jg .L3

mov eax, DWORD PTR [rbp-8]

mov esi, eax

mov edi, OFFSET FLAT:.LC1

mov eax, 0

call printf

add DWORD PTR [rbp-8], 1

jmp .L4

.L3:

mov edi, 10

call putchar

add DWORD PTR [rbp-4], 1

jmp .L5

.L2:

mov eax, 0

leave

ret

Input:

6

The program was first written with a c code, anf and subsequently translated to an assembly language.

3 0
3 years ago
Other questions:
  • You are given a string of n characters s[1 : : : n], which you believe to be a corrupted text document in which all punctuation
    12·1 answer
  • When u look at a green object through red glass the object will appear
    11·2 answers
  • One of the difficult decisions a systems analyst has to make when it comes to software is whether to recommend making, buying, o
    13·1 answer
  • Please write down a java program for below instruction.Min-Heap: Construct a Min_Heap from the following set of integers. Rememb
    5·1 answer
  • The work day has just started and you receive reports that the inventory management server is not accessible on your company's n
    7·1 answer
  • PHP is based on C rather than ______.
    5·1 answer
  • Most professional coding standards use _____ for class names. (Points : 2) underscores along with all upper case words
    15·1 answer
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was?
    13·2 answers
  • You need to buy a cable to connect a desktop PC to a router. Which cable should
    13·1 answer
  • What is the importance of shape in graphic design?​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!