Friday, May 17, 2013

Interchange The Value Of 1st And 2nd

/* Interchange The Value Of 1st And 2nd  */

/* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int a,b,c;
         printf("Enter 1st Value ");
         scanf("%d",&a);
         printf("Enter 2nd Value ");
         scanf("%d",&b);
         c=a;
         a=b;
         b=c;
         printf("The Interchange Value Is : %d %d ",a,b);
         getch();
      }

The Output is :-

Calculate The Area & Perameter Of A Ractangle And The Area & Circumference Of The Circle

/* Calculate The Area & Perimeter Of A Rectangle
   And The Area & Circumference Of The Circle */

/* The Length And Breadth Of A Rectangle And Radius Of A Circle Are Input Through
   The Keyboard. Write A Program To Calculate The Area & Perimeter Of A Rectangle
   And The Circumference Of The Circle */

/* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         float length,breadth,radius,area,perimeter,circumference;
         printf("Enter The Length ");
         scanf("%f",&length);
         printf("Enter The Breadth ");
         scanf("%f",&breadth);
         printf("Enter The Radius ");
         scanf("%f",&radius);
         area=length*breadth;
         printf("Area Of A Rectangle Is = %.2f \n", area);
         perimeter=2*(length+breadth);
         printf("Perimeter Of A Rectangle Is = %.2f \n", perimeter);
         circumference=2*3.14*radius;/* 2 * pi symbol * r = 2*3.14*radius*/
         printf("Circumference Of A Circle Is = %.2f \n", circumference);
         getch();
      }


The Output is :-



Distance Between Two Cities Kilometer To Meters,Feet,Inches,and Centimeters

/* Distance Between Two Cities Kilometer To Meters,Feet,Inches,and
   Centimeters */

/* The Distance Between Two Cities In KM is Input Through The Keyboard. Write A
   Programe To Convert And Print This Distance In Meters,Feet,Inches,and
   Centimeters */

/* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int km;
         float meters,foot,inch,centimeters;
         printf("Enter The Kilometer ");
         scanf("%d",&km);
         meters=km*1000;
         printf("%d Kilometer = %.2f Meter \n",km,meters);
         foot=km*3280.84;
         printf("%d Kilometer = %.2f Feet \n",km,foot);
         inch=km*39370.1;
         printf("%d Kilometer = %.2f Inch \n",km,inch);
         centimeters=km*100000;
         printf("%d Kilometer = %.2f Centimeter \n",km,centimeters);
         getch();
      }


The Output is :-


Tuesday, May 14, 2013

Find Out The Leap Year

    /* Find Out The Leap Year */

    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int y;
         printf("Enter The Year ");
         scanf("%d",&y);
         if(y%400 ==0 || (y%100 != 0 && y%4 == 0))
             printf("%d Is A Leap Year ",y);
         else
             printf("%d Is Not A Leap Year ",y); 
         getch();
      }


The Output is :-

Find Entered Charecter Is Capital, Small, Special Charecter Or Digit

    /* Find Entered Charecter Is Capital, Small, Special Charecter Or Digit */

    /*    ASCII Value    */
    /*    A To Z=65 To 90  (Capital Letter)    */
    /*    a To z=97 To 122 (Small Letter)    */
    /*    0 To 9=48 To 57  (Digit)    */
    /*    <48  (Special Charecter)    */

    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         char a;
         printf("Enter Any Charecter ");
         scanf("%c",&a);
         if(a>=65 && a<=90)
         printf("You Have Entered A Capital Charecter");
         if(a>=97 && a<=122)
         printf("You Have Entered A Small Charecter");
         if(a>=48 && a<=57)
         printf("You Have Entered A Digit");
         else if(a<48)  
         printf("You Have Entered A Special Charecter");     
         getch();
      }

The Output is :-


Convert Capital Letter To Small Letter

    /* Convert Capital Letter To Small Letter  */

    /*    ASCII Value    */
    /*    A To Z=65 To 90  (Capital Letter)    */
    /*    a To z=97 To 122 (Small Letter)    */
    /*    0 To 9=48 To 57  (Digit)    */
    /*    <48  (Special Charecter)    */

    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         char a;
         char b;
         printf("Enter Any Capital Letter ");
         scanf("%c",&b);
         a=b+32;
         {
             printf("The Converted Small Letter Is %c",a);
         }        
         getch();
      }

The Output is :-

Convert Capital Letter Or Small Letter To ASCII Value

    /* Convert Capital Letter Or Small Letter To ASCII Value  */

    /*    ASCII Value    */
    /*    A To Z=65 To 90  (Capital Letter)    */
    /*    a To z=97 To 122 (Small Letter)    */
    /*    0 To 9=48 To 57  (Digit)    */
    /*    <48  (Special Charecter)    */

    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int a;
         char b;
         printf("Enter Any Capital Or Small Letter ");
         scanf("%c",&b);
         printf("The ASCII Value Of This Letter Is %d",b);
         getch();
      }

The Output is :-


Calculate Da,Ta,Hra Using If Else

    /* Calculate Da,Ta,Hra Using If Else  */
    /*
    ****If Basic >= 7000 Then Da 50% Hra 30% And Ta 20%****
    ****If Basic >= 5000 And Basic < 7000 Then Da 30% Hra 20% And Ta 20%****
    */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         float basic,da,ta,hra,gross;
         printf("Enter Your Basic Salary ");
         scanf("%f",&basic);
         if(basic>=7000)
         {
             da=basic*.5;
             hra=basic*.3;
             ta=basic*.2;
             gross=basic+da+ta+hra;          
             printf("Gross=%.2f",gross);
         }
        else if(basic>=5000 && basic<7000)
         {
             da=basic*.3;
             hra=basic*.2;
             ta=basic*.2;
             gross=basic+da+ta+hra;          
             printf("Gross=%.2f",gross);
         }
         else
         {
             printf("Please Enter Your Basic Salary Above Or Equal To 5000");
         }
        
         getch();
      }

The Output is :-



Grade Calculation

    /* Grade Calculation */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int roll,marks1,marks2,marks3,total;
         char grade,name[8];
         printf("Enter Your Name ");
         scanf("%s",&name);
         printf("Enter Your Roll Number ");
         scanf("%d",&roll);
         printf("Enter marks1 ");
         scanf("%d",&marks1);
         printf("Enter marks2 ");
         scanf("%d",&marks2);
         printf("Enter marks3 ");
         scanf("%d",&marks3);
         total=marks1+marks2+marks3;
         printf("Total Marks Is %d",total);
         printf("\n\n\n ");
         if(total>=280)
            {
            grade='a';
            printf("Grade=%c",grade);
            }
         if(total>=250 && total<280)
            {
            grade='b';
            printf("Grade=%c",grade);
            }
         if(total>=180 && total<250)
            {
            grade='c';
            printf("Grade=%c",grade);
            }
         else if(total<180)
            {
            grade='f';
            printf("Grade=%c",grade);
            }
         getch();
      }


The Output is :-




Find The Depertment Using If Else

    /* Find The Depertment Using If Else */
    /*
    ****Salary Grater Then 6000 Then Depertment Is Company****
    ****Salary Between 3000 to 6000 Then Depertment Is Market****
    ****Salary Less Then 3000 Is Sales****
    ****Find The Depertment Using This Upper Criteria****
    */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int id,basic;
         printf("Enter Your Company Id ");
         scanf("%d",&id);
         printf("Enter Your Basic Salary ");
         scanf("%d",&basic);
         if(basic>=6000)
         {
             printf("Your Depertment Is Company ");
         }
         else if(basic>=3000 && basic<6000)
         {
             printf("Your Depertment Is Market ");
         }
         else
             printf("Your Depertment Is Sales ");
         getch();
      }




The Output is :-





Friday, May 10, 2013

Find The Even And Odd Number

 /* Find The Even And Odd Number */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         int a;
         printf("Enter The Number ");
         scanf("%d",&a);
         if(a%2==0)
             printf("This Is An Even Number ");
         else
             printf("This Is An Odd Number ");
         getch();
      }

The Output is :-

 

Find The Maximum Value Of Four Number

    /* Find The Maximum Value Of Four Number */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         float a,b,c,d;
         printf("Enter The First Number ");
         scanf("%f",&a);
         printf("Enter The Second Number ");
         scanf("%f",&b);
         printf("Enter The Third Number ");
         scanf("%f",&c);
         printf("Enter The Fourth Number ");
         scanf("%f",&d);
         if(a>b && a>c && a>d)
         {
         printf("First Number Is Maximum");
         }
         else if(b>a && b>c && b>d)
         {
         printf("Second Number Is Maximum");
         }
         else if(c>a && c>b && c>d)
         {
         printf("Third Number Is Maximum");
         }
         else if(d>a && d>b && d>c)
         {
         printf("Fourth Number Is Maximum");
         }
         else
         {
         printf("Please Enter Diffrent Value For Four Number ");
         }
         getch();
      }

The Output is :-

Simple Interest Calculation

    /* Simple Interest Calculation */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    void main()
      {
         float rate_of_money,year,interest,simple_interest;
         printf("Enter The Rate Of Money ");
         scanf("%f",&rate_of_money);
         printf("Enter The Year ");
         scanf("%f",&year);
         printf("Enter %Of Interest ");
         scanf("%f",&interest);
         simple_interest=(rate_of_money*year*interest)/100;
         printf("The Simple Interest Is %.2f",simple_interest);
         getch();
      }

The Output is :-

Find The Square Root Of A Number

/* Find The Square Root Of A Number */
    /* Suchetan Dey */
   
    #include<stdio.h>
    #include<conio.h>
    #include<math.h>
    void main()
      {
         float a,b;
         printf("Enter The Number For Square Root ");
         scanf("%f",&a);
         b=sqrt(a);
         printf("The Square Root Is %.2f",b);
         getch();
      }

The Output is :-

Thursday, May 9, 2013

Average Of Three Number

/*Average Of Three Number*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
    void main()
    {
        float a,b,c,d;
        printf("Enter The 3 Value For Generate The Average \n");
        scanf("%f%f%f",&a,&b,&c);
        d=(a+b+c)/3;
        printf("The Average value Is : %.2f \n",d);
        getch();
    }

The Output is :-

Fahrenheit to Celsius

/* Fahrenheit  to Celsius */
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
    void main()
    {
         float c,f;
         printf("Enter the value of Temperature in Fahrenheit: ");
         scanf("%f",&f);
         c=5*(f-32)/9;
         printf("Converted Celsius value Is : %.2f \n",c);
         getch();
    }
The Output is :-

How to Write Your First C Program ?

When Anyone Want To Start Learning C Program Then He / She Faced A Problem Where I Start from And What Integrated Development Environment Is Suitable For My Programming?

Don't Worry There Are So Many Open Source Integrated Development Environment Available In Online. I Will Introduce You Some Of Those Popular IDE For Your Best Programming Experience. 3 Popular IDE are -

Dev-C++ 
Download Resource :- http://www.bloodshed.net/dev/devcpp.html 

Feature list

Another Dev-C++ screenshot

  • Support GCC-based compilers
  • Integrated debugging (using GDB)
  • Support for multiple languages (localization)
  • Class Browser
  • Code Completion
  • Debug variable Browser
  • Project Manager
  • Customizable syntax highlighting editor
  • Quickly create Windows, console, static libraries and DLLs
  • Support of templates for creating your own project types
  • Makefile creation
  • Edit and compile Resource files
  • Tool Manager
  • Print support
  • Find and replace facilities
  • Package manager, for easy installation of add-on libraries
  • CVS Support
  • To-Do List
  • CPU Window

Requirements


  • Windows 95 or higher.
  • 32 MB of RAM.
  • The executables compiled by Dev-C++ will need MSVCRT.DLL (comes with Windows 95 OSR 2 or higher).

CodeLite
http://codelite.org/img/codelite-logo.png
Download Resource :- http://codelite.org/Main/ReadMore

Feature list

  • Generic support for compilers
  • Can be easily extended with plugins (several plugins are already included in the installer)
  • Built-in GDB support, with the following features included:
    • Watches table - add persistent watches with a single click
    • Quick Watch - right click on a variable to expand it
    • Locals tree - automatically displays the current stack variables (also displays *this if available)
    • Threads view - contains a list of currently-running threads; switch between them with a single click
    • Breakpoint management - 'add/remove breakpoint' management panel
    • Automatic tooltip
    • Memory view
    • Tree View tooltips (auto de-references pointers)
    • Allow modifying tooltips
  • Refactoing (rename symbol / rename locals / move functions and more)
  • Subversion plugin (based on the command line tool)
  • GIT plugin
  • Outline
  • cscope plugin
  • External Tools plugin
  • Gizmos plugin - for the creation of: C++ classes, wxWidgets projects, CodeLite plugins
  • Makefile based build system
  • Project explorer (Workspace view)
  • File Explorer
  • Imports MSVS workspace/projects and converts them to use a GNU-based makefile
  • Active-document outline
  • Sophisticated database-based Code Completion mechanism; a default database is supplied which contains symbols for wxWidgets, STL and standard headers
    • Function's call tip
    • Hover tip
    • Comments tips
    • Members List
    • Supports C++ templates, namespaces and other advance features of the language
    • Automatically add include statement for symbols
    • Code Refactoring (rename class/method/member)
    • Implement all unimplemented methods
    • Implement method
    • Move functions implementation to another source file
    • Generate setters/getters
  • Quickly open resources in the editor using 'Find Resource in workspace'
  • Quickly open types in the editor using 'Find Type in workspace'
  • XML-based syntax highlighting, comes with the following:
    • C/C++
    • Java
    • Perl
    • XML
    • Makefile
    • Lua
    • Diff files
    • PHP
    • JavaScript
    • Python
    • HTML
    • ASP
    • SQL
  • Text Folding
  • Bookmarks
  • Lighning fast Find In Files
  • Replace In Files
  • Highly Configurable
  • Built-in doxygen comment generator for functions/classes
  • And much more... 
Eclipse IDE for C/C++ Developers
Download Resource :- http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr2

http://www.eclipse.org/downloads/images/cdt.pngFeature list

org.eclipse.cdt
org.eclipse.cdt.autotools
org.eclipse.cdt.build.crossgcc
org.eclipse.cdt.debug.ui.memory
org.eclipse.cdt.launch.remote
org.eclipse.cdt.msw
org.eclipse.cdt.mylyn
org.eclipse.cvs
org.eclipse.egit
org.eclipse.egit.import
org.eclipse.epp.package.common.feature
org.eclipse.equinox.p2.user.ui
org.eclipse.help
org.eclipse.mylyn.bugzilla_feature
org.eclipse.mylyn.context_feature
org.eclipse.mylyn.ide_feature
org.eclipse.mylyn.team_feature
org.eclipse.mylyn.wikitext_feature
org.eclipse.mylyn_feature
org.eclipse.platform
org.eclipse.rcp
org.eclipse.rse

After Choosing The IDE What Will Be The Next For Learning C Programming? 
   
At First You Have To Download A free C++ IDE for Windows and Linux. After That You Have To Install The IDE In Your Computer Then You Use The IDE.

For Any Help Regarding C Program Feel Free To Contact Me Through This Blog. I Try To Solve Your Problem.  

Monday, May 6, 2013

Division Of Two Number

/*Division Of Two Number*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
     void main()
     {
          int a,b,c;
          clrscr();
          printf("Enter The Number Of A \n");
          scanf("%d",&a);
          printf("Enter The Number Of B \n");
          scanf("%d",&b);
          c=a/b;
          printf("The Division Of Two Number Is %d",c);
          getch();
     }

The Output is :-

Multiplication Of Two Number



/*Multiplication Of Two Number*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
                 void main()
                 {
                                  int a,b,c;
                                  clrscr();
                                  printf("Enter The Number Of A \n");
                                  scanf("%d",&a);
                                  printf("Enter The Number Of B \n");
                                  scanf("%d",&b);
                                  c=a*b;
                                  printf("The Multiplication Is %d",c);
                                  getch();
    }

The Output is :-

Subtraction Of Two Number

/*Subtraction Of Two Number*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
    void main()
    {
        int a,b,c;
        clrscr();
        printf("Enter The Number Of A \n");
        scanf("%d",&a);
        printf("Enter The Number Of B \n");
        scanf("%d",&b);
        c=a-b;
        printf("The Subtraction Is %d",c);
        getch();
    }

The Output is :-




Summation Of Two Number

/*Summation Of Two Number*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
    void main()
    {
        int a,b,c;
        printf("Enter The Number Of A ");
        scanf("%d",&a);
        printf("Enter The Number Of B ");
        scanf("%d",&b);
        c=a+b;
        printf("The Summation Is %d",c);
        getch();
    }
The Output is :-



Your First Program In C

/*Your First Program In C*/
/* Suchetan Dey */

#include<stdio.h>
#include<conio.h>
    void main()
    {
        printf("Hello World !");
        getch();
    }
The Output is :-