Answer to Question #259432 in C for fas

Question #259432

Delhi government has issued a circular to control the pollution due to vehicle. It has prohibited the use of odd numbers registered vehicle on Monday, Wednesday and Friday and not to use even number registered vehicles on Tuesday, Thursday and Saturday. Sunday they have to use public transport so no vehicle should be used.


A software application is to be developed by Delhi Government which will inform the owner of the vehicle on which day they can use the vehicle.

Following are the requirements to solve the problem

a. The registration number of the vehicle should be captured from the owner.

b. Check if the registration number is odd or even.

c. Inform user on which day they can use the vehicle.


1
Expert's answer
2021-10-31T18:41:29-0400
#include<stdio.h>
#include<conio.h>
int main()
{
	int registrationNumber;
	printf("Enter the registration number of the vehicle: ");
	scanf("%d", &registrationNumber);
	// Check if the registration number is odd or even.
	if(registrationNumber%2==0){
		printf("You can use the vehicle on Monday, Wednesday and Friday.\n\n");
	}else{
		printf("You can use the vehicle on Tuesday, Thursday and Saturday.\n\n");
	}


	getch();
	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