Answer to Question #282743 in C for sunny

Question #282743



Instructions:

  1. Input two integers in one line. The first inputted integer will be the starting point, and the second one shall serve as the ending point.
  2. Use the power of loops to loop through the starting point until the ending point (inclusive), and print out each number within the range with the corresponding format shown on the sample output.
  3. However, skip the printing of statement if the integer is divisible by 4.
  4. Tip: Utilize the continue keyword to complete the process.

Input


1. The starting point

2. The ending point

Output

The first line will contain a message prompt to input the starting point.

The second line will contain a message prompt to input the ending point.

The succeeding lines will contain the appropriate messages.

Enter·the·starting·point:·2
Enter·the·ending·point:·10
Loading...2%
Loading...3%
Loading...5%
Loading...6%
Loading...7%
Loading...9%
Loading...10%




1
Expert's answer
2021-12-26T09:41:23-0500
#include <stdio.h>
#include <string.h>
#include <ctype.h>


int main(){
	int  startingPoint,secondPoint;
	//Input two integers in one line. The first inputted integer will be the starting point, and the second one shall serve as the ending point.
	scanf("%d%d",&startingPoint,&secondPoint);
	
	//Use the power of loops to loop through the starting point until the ending point (inclusive), and print out each number within the range with the corresponding format shown on the sample output.
	for(int i=startingPoint;i<=secondPoint;i++){
		//However, skip the printing of statement if the integer is divisible by 4.
		if (i % 4 == 0){
			continue;
		}
		printf("Loading...%d%\n",i);
	}




	getchar();
	getchar();
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS