Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Mathematics ProgramRSS Feeds

WRITE A PROGRAM ENTERED THROUGH THE KEYBOARD FOR KILO METERS AND METERS

Posted By: Lucas Evans     Category: C Programming     Views: 3138

WRITE A PROGRAM ENTERED THROUGH THE KEYBOARD FOR K.M. AND METERS. WRITE A PROGRAM TO PRINT A SUM OF THESE TWO IN METERS.

Code for WRITE A PROGRAM ENTERED THROUGH THE KEYBOARD FOR KILO METERS AND METERS in C Programming

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

void main()
{
    float sum=0.0;
    float meter,km;
    clrscr();
    printf("ENTER THE KILO METER :- ");
    scanf("%f",&km);
    printf("ENTER THE METER :- ");
    scanf("%f",&meter);

    sum = km +  meter/1000;
    printf("THE KILO     METER IS :- %2.2f",sum);

    getch();
}
  
Share: 



Lucas Evans
Lucas Evans author of WRITE A PROGRAM ENTERED THROUGH THE KEYBOARD FOR KILO METERS AND METERS is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!