Feet To Inch-Computer Fundamentals and Programming-Coding Assignment Solution, Exercises of Computer Engineering and Programming

Kapish Gupta assigned programming task at Assam Don Bosco University. This code was developed and compiled in Borland. It includes: Distance, Format, Required, Feet-Inch, Printf, Scanf, Number, Getch, Programming, Language, C/C , Conversion

Typology: Exercises

2011/2012

Uploaded on 07/28/2012

dewansh
dewansh 🇮🇳

4.4

(10)

89 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
#include<stdio.h>
#include<conio.h>
void main (void)
{
void converter (int,int);
int feet, inch;
clrscr();
printf ("\n\nPlease enter the distance in feet\n");
scanf ("%d",&feet);
printf ("\nPlease enter the distance in inches\n");
scanf ("%d",&inch);
converter (feet,inch);
getch();
}
void converter (int x,int y)
{
int a,b,c;
if (y>=12)
{
a = y/12;
b = x+a;
c = y%12;
printf ("The distance in the required format is (%d.%d)",b,c);
}
else
{
printf ("The distance in the required format is (%d.%d)",x,y);
}
getch();
}
Feet-inch
docsity.com

Partial preview of the text

Download Feet To Inch-Computer Fundamentals and Programming-Coding Assignment Solution and more Exercises Computer Engineering and Programming in PDF only on Docsity!

#include<stdio.h> #include<conio.h> void main (void) { void converter (int,int); int feet, inch; clrscr(); printf ("\n\nPlease enter the distance in feet\n"); scanf ("%d",&feet); printf ("\nPlease enter the distance in inches\n"); scanf ("%d",&inch); converter (feet,inch); getch(); } void converter (int x,int y) { int a,b,c; if (y>=12) else getch(); }^ {^ a = y/12;^ b = x+a;^ c = y%12;^ printf ("The distance in the required format is (%d.%d)",b,c);^ } { printf ("The distance in the required format is (%d.%d)",x,y); }

Feet-inch docsity.com