Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Stub Program for Problem 6 HW 2
// Stub program for Problem 6 HW 2 Fall 2016 #include <stdio.h> #define SIZE 30 #define ERROR -1 ////////////////////////////////////////////////////////////////////// // Function name: inches2cm // // Description: Perform inches-to-cm conversion, using // integer operations only. // // Input parameters: // inches, the input value measured in inches. // // Returns: // The nearest centimeter value that corresponds to the input // value. // unsigned int inches2cm (unsigned int inches) { // Your code goes here! } int main(void) { // number that we read in from stdin unsigned int inputNumber; // output number (hopefully cms) unsigned int outputNumber; printf("\n*** Stub program for Problem 6 -- inches2cm ***\n\n"); // First read in an integer scanf("%d\n", &inputNumber); // print out the input number printf("Read in the number %d.\n\n", inputNumber); // Call your routine outputNumber = inches2cm(inputNumber); // Print out the result printf("After function call the outputNumber is %d.\n\n", outputNumber); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
project 5 v0.04
B_141111_Divisores
C_141113_euclides
Midterm practice 2
A_141124arrayRepetidos
Funciones en C
1.1 Hello World!
Sunday assignment late v3
alphabet2 pyramid right
final advice
Please log in to post a comment.