Neeraj Mishra

A crazy computer and programming lover. He spend most of his time in programming, blogging and helping other programming geeks.

Prime Number in C++

Here you learn how to check prime number in C++. Prime number is a number which is only divided by 1 or itself. Below is the C++ program to check whether a number is prime of not.   Prime Number in C++   Output Enter any number:7 7 is a Prime number

C++ Program for temperature conversion which converts fahrenheit to celcius or celcius to fahrenheit depending upon user's choice

#include<iostream.h>#include<conio.h> void main(){ clrscr(); //to clear the screen float temp,res; int choice; cout<<“Temperature Conversion”<<“nn   1.Fahrenheit to Celcius”; cout<<“n   2.Celcius to FahrenheitnnEnter your choice:”; cin>>choice; switch(choice){ case 1: {     cout<<“nEnter temperature in Fahrenheit:”;     cin>>temp;     res=(temp-32)/1.8;} break; case 2: {     cout<<“nEnter temperature in Celcius:”;     cin>>temp;     res=(temp*1.8)+32;} break; } cout<<“nConverted Temperature=”<<res; getch(); …

C++ Program for temperature conversion which converts fahrenheit to celcius or celcius to fahrenheit depending upon user's choice Read More »

C++ Program to Check Leap Year

Here is C++ program to check whether a year is a leap year or not. A leap year consists of 366 days instead of 365 days. In a leap year, February month consists of 29 days. Output: Enter Year(ex:1900):2000 Leap Year