subject

Programing in c
1. given int variables k and total that have already been declared , use a for 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.
2. given an int variable k that has already been declared , use a loop to print a single line consisting of 97 asterisks. use no variables other than k.
3. given an int variable k that has already been declared , use a for loop to print a single line consisting of 97 asterisks. use no variables other than k.
4. 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 for 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..
5. 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 for loop to compute the sum of the cubes of the first n whole numbers, and store this value in total. thus if nequals 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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Show that there is a language a ⚆ {0, 1} â— with the following properties: 1. for all x â a, |x| ≤ 5. 2. no dfa with fewer than 9 states recognizes a. hint: you don’t have to define a explicitly; just show that it has to exist. count the number of languages satisfying (1) and the number of dfas satisfying (2), and argue that there aren’t enough dfas to recognize all those languages. to count the number of languages satisfying (1), think about writing down all the strings of length at most 5, and then to define such a language, you have to make a binary decision for each string about whether to include it in the language or not. how many ways are there to make these choices? to count the number of dfas satisfying (2), consider that a dfa behaves identically even if you rename all the states, so you can assume without loss of generality that any dfa with k states has the state set {q1, q2, . . , qk}. now think about how to count how many ways there are to choose the other four parts of the dfa.
Answers: 3
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 1
You know the right answer?
Programing in c
1. given int variables k and total that have already been declared , use a for...
Questions
question
Physics, 30.08.2019 17:30
question
Mathematics, 30.08.2019 17:30
question
History, 30.08.2019 17:30
question
Mathematics, 30.08.2019 17:30
Questions on the website: 13722362