Answer to Question #278123 in C for Vraj

Question #278123

time calculator write a program that asks the user to enter a number of seconds in c language



1
Expert's answer
2021-12-10T06:38:38-0500


#include <stdio.h>




int main(){
	int seconds=-1;
	while(seconds<0 || seconds>60){
		printf("Enter a number of seconds: ");
		scanf("%d", &seconds);
	}
	
	printf("\nSeconds: %d\n", seconds);
	getchar(); 
	getchar(); 
	return 1;
}  

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