Advertisement Jump to content
  • Advertisement

srikanthpv

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

100 Neutral

About srikanthpv

  • Rank
    Newbie
  1. srikanthpv

    Game programmer Interview question

    This question was the 1 which freekd me out..But there wasnt much math in this 1 compared to the 1st.... Advanced calculator [Edited by - srikanthpv on November 24, 2008 12:51:43 PM]
  2. srikanthpv

    Game programmer Interview question

    Hi all... Thats a very good way to solve the problem...But they mentioned Ansi C is not a must is always preferable....So i thought indirectly they mean its must to do in C itself then c#
  3. srikanthpv

    Game programmer Interview question

    Hey bro this was the easiest of the lot i got... Good one's are yet to come...M just trying to analyze this 1 fist...
  4. srikanthpv

    Game programmer Interview question

    I was thinking the same way...It took me 2 hours to reach something close by...But i dont think that guy was satisfied with it though...I am still working on the code...Will come out with it in a day...
  5. All the remember when i was programming in my school was using a switch operator but they dint want me to use switch....And infact were asking me to build a Improved calc...Using unsigned int... #include <stdio.h> int main() { double number1 = 1.0; double number2 = 2.0; char operation = '+'; char answer = 0; switch(operation) { case '+': printf("= %lf\n", number1 + number2); break; case '-': printf("= %lf\n", number1 - number2); break; case '*': printf("= %lf\n", number1 * number2); break; case '/': if(number2 == 0) printf("\n\n\aDivision by zero error!\n"); else printf("= %lf\n", number1 / number2); break; case '%': if((long)number2 == 0) printf("\n\n\aDivision by zero error!\n"); else printf("= %ld\n", (long)number1 % (long)number2); break; default: printf("\n\n\aIllegal operation!\n"); } } [Edited by - srikanthpv on November 21, 2008 2:30:05 AM]
  6. 1. Write a function that given a string of digits and a target value, prints where to put +'s and *'s between the digits so they combine exactly to the target value. Note there may be more than one answer, it doesn't matter which one you print. Examples: "1231231234",11353 -> "12*3+1+23*123*4" "3456237490",1185 -> "3*4*56+2+3*7+490" "3456237490",9191 -> "no solution" [Edited by - srikanthpv on November 21, 2008 2:20:36 AM]
  7. [Edited by - srikanthpv on November 20, 2008 4:02:29 PM]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!