Program for Prime Number in Java

Here you will get program for prime number in java. A number is prime if it is divisible by 1 or itself. For example 2, 3, 5, etc are prime numbers while 4, 6, 8, etc are not prime. Program for Prime Number in Java   Output

C program that compare two given dates. To store a date use a structure that contains three members namely day, month and year. If dates are equal then display a message as EQUAL otherwise UNEQUAL

#include<stdio.h> #include<conio.h> struct date { int day; int month; int year; }; void main() { struct date d1,d2; clrscr(); printf(“Enter first date(dd/mm/yyyy):”); scanf(“%d%d%d”,&d1.day,&d1.month,&d1.year); printf(“nEnter second date(dd/mm/yyyy):”); scanf(“%d%d%d”,&d2.day,&d2.month,&d2.year); if((d1.day==d2.day)&&(d1.month==d2.month)&&(d1.year==d2.year)) printf(“nEQUAL”); else printf(“nUNEQUAL”); getch(); }