
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 1
This page cannot be seen from the preview
Don't miss anything!

#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