Question: this is 3 language C programs. please answer if you know how to do It. you don't have to do any more programming then giving
this is 3 language C programs. please answer if you know how to do It. you don't have to do any more programming then giving me the answer where it says your solution goes here. please only answer if you know what your doing.
Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space. Example output for userNum = 40:
20 10 5 2 1
#include
int main(void) { int userNum;
userNum = 40;
/* Your solution goes here */
printf(" ");
return 0; }
#include
int main(void) { int userNum;
userNum = 40;
/* Your solution goes here */
printf(" ");
return 0; }
#include
int main(void) { int userNum;
userNum = 40;
/* Your solution goes here */
printf(" ");
return 0; }
#include
int main(void) { int userNum;
userNum = 40;
/* Your solution goes here */
printf(" ");
return 0; }
Given positive integer numInsects, write a while loop that prints that number doubled without reaching 100. Follow each number with a space. After the loop, print a newline. Ex: If numInsects = 8, print:
8 16 32 64 #includeint main(void) { int numInsects; numInsects = 8; // Must be >= 1 /* Your solution goes here */ return 0; Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with newline. Ex: For the user input 123, 395, 25, the expected output is:
Enter a number (<100): Enter a number (<100): Enter a number (<100): Your number < 100 is: 25
#includeint main(void) { int userInput; /* Your solution goes here */ printf("Your number < 100 is: %d ", userInput); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
