logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/sternflCode/q2.c

#include<stdio.h>

int main() {
  printf("Problem %d answer=%d\n", 1, 5*5%10);
  printf("Problem %d answer=%d\n", 2, 5+5/10);
  printf("Problem %d answer=%d\n", 3, 5/5*10);
  printf("Problem %d answer=%d\n", 4, 5/10);
  printf("Problem %d answer=%f\n", 5, 5/10.0);
  int x;
  printf("Please enter an integer value ");
  scanf("%d\n", &x);
  printf("Problem %d answer=%d\n", 6, x);

  return 0;
}