Run Code
|
API
|
Code Wall
|
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
Lab 5 HW Spring 2017 v1
PREGUNTA 2, GUÍA 4, MÓDULO 3 FINALIZADA
e
hwk2
BMI Calc CT
C pattern Rhombus
C Array Demonstration
summing long int
TAREA M4 - LOTERIA
MATRICES DE CARACTERES