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.
#include<stdio.h>
#include<conio.h>
int main()
{
int registrationNumber;
printf("Enter the registration number of the vehicle: ");
scanf("%d", ®istrationNumber);
// 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;
}
Comments
Leave a comment