“Sometimes it is the people no one can imagine anything of who do the things no one can imagine.” ― Sir Alan Turing


ADS

ADS

Saturday, April 8, 2017

UVa 10696 f91 Solution in C / C++


Source Code

#include<stdio.h>

int main() {
  int a, b;
  while (scanf("%d", & a) == 1 && a != 0) {
    if (a > 100)
      b = a - 10;
    else
      b = 91;
    printf("f91(%d) = %d\n", a, b);
  }
  return 0;
}

No comments:

Post a Comment