Computers and Technology

In C language

1. Given an int variable k that has already been declared , use a while loop to print a single line consisting of 97 asterisks. Use no variables other than k.

2.Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has already been declared , use a while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j.

3.Given int variables k and total that have already been declared , use a while loop to compute the sum of the squares of the first 50 positive integers and store this value in total. Thus your code should put 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 into total. Use no variables other than k and total.

4.Given an int variable n that has been initialized to a positive value and, in addition, int variables k and total that have already been declared , use a while loop to compute the sum of the cubes of the first n whole numbers, and store this value in total. Thus if n equals 4, your code should put 1*1*1 + 2*2*2 + 3*3*3 + 4*4*4 into total. Use no variables other than n, k, and total.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, jack487
How can a user delete a drawing object
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, danielcano12281621
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
Do you know the correct answer?
In C language

1. Given an int variable k that has already been declared , use a while lo...

Questions in other subjects:

Konu
English, 04.04.2021 03:20
Konu
English, 04.04.2021 03:20
Konu
Mathematics, 04.04.2021 03:20