Answer to Question #265828 in C for Puneeths

Question #265828

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.

1
Expert's answer
2021-11-14T17:02:47-0500
#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