Showing posts with label if/else. Show all posts
Showing posts with label if/else. Show all posts

Thursday, 24 May 2012

C program to find out whether a given year is a leep year or not




#include<stdio.h>
#include<conio.h>


void main()
{
int year;
clrscr(); //to clear the screen

Monday, 7 May 2012

C program to find whether a given character is an alphabet,digit or any special character(using ASCII values)


#include<stdio.h>
#include<conio.h>


void main()
{
    char ch;
    clrscr();    //to clear the screen
    printf("Enter any character:");
    scanf("%c",&ch);

C program to convert temperature from Fahrenheit to Celsius or Celsius to Fahrenheit



#include<stdio.h>
#include<conio.h>


void main()
{
    double temp,ctemp;
    int ch;
    clrscr();    //to clear the screen

Thursday, 3 May 2012

C program to accept three numbers and print largest of the three


#include<stdio.h>
#include<conio.h>


void main()
{
int x,y,z,max;
clrscr(); //to clear the screen