Write a while loop to start with an integer named \'balance\' (initialize it to
ID: 3837245 • Letter: W
Question
Write a while loop to start with an integer named 'balance' (initialize it to 500). Each iteration of the loop should display its value and decrease balance by 50 as long as balance is positive. Write a for loop to display the multiples of 3 from 3 to 30. Write C code to initialize an array of ints to the last four digits of your phone number. Use a loop to add the digits. Calculate and display the average of the digits. Write a struct to hold student information: integer id integer number of hours taken integer number of hours passed double gpa create a variable of the type in #21 and initialize it with some data what does malloc() do? compare and contrast arrays and linked listsExplanation / Answer
8.
int balance;
for(balance = 500; balance > 0; balance -= 50)
{
printf("%d ", balance);
}
9.
int i;
for(i = 1; i <= 10; i++)
{
printf("%d ", 3*i);
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.