logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/sternflCode/fun2.c

#include<stdio.h>

int triple(int);  //prototype

int main() {
  int s;
  printf("Please enter a small integer ");
  scanf("%d", &s);
  int y = triple(s);  //y = 3*s;
  printf("%d\n", y);

  return 0;
}

//definition of triple
int triple(int x) {
  return 3*x;
}