Input: 10 400 output: 13 21 34 55 89 144 233 377
main() { int start,end,a,b,c; // get start and end from user a=0; b=1; c=a+b; while(c<start) { a=b; b=c; c=a+b; } do { printf("%d\n",c); a=b; b=c; c=a+b; } while(c<end); }
Given input as a string, return an integer as the sum of all numbers found in the string
Input: xyzonexyztwothreeeabrminusseven Output : 1 + 23 + (-7) = 17
Write your own rand function which returns random numbers in a given range(input) so that the numbers in the given range is equally likely to appear.
Input: My SpAce Output: mY sPaCE