Register - Log In


FunTrivia Homepage



  • New Questions

  • Unanswered


  • Post a Question
  • Goto Qn #





    Archives

    What is the command to print the sum of first 10 natural numbers?

    Question #108038. Asked by richimishra. (Aug 16 09 9:24 AM)


    Mercenary_Elk

    Command? As in programming? You need to give us a language.
    Also, the sum of the first ten natural numbers is 55.
    Rather than slow down a program by asking it to output 1+2+3+4+5+6+7+8+9+10, just ask it to output 55.
    But I'll attempt to answer anyways.

    Pascal Command: writeln('55');
    Java Command: System.out.println("55");
    Python Command: print("55");

    Are any of these even close to what you wanted?

    Aug 16 09, 9:55 AM


    Find something useful here? Please help us spread the word about FunTrivia. Recommend this page below!


    Sign up to see all responses!

    Create a Free ID instantly to see all recent responses, post your own follow-ups or questions, and access over 1,000,000 trivia questions!

    Choose a User Name:
    Your Email Address:
    Choose a Password:

    I agree by the terms outlined in FunTrivia's Conditions of Use





    Other Similar Questions & Answers


    What is the command to print the first 10 natural numbers in QBasic?

    When writting numbers, when should one print out the number (i.e. two) - and when should one use the digit (i.e. 2)?

    Under the command structure of the Nazis, who was Adolph Hitler's second in command to take over in the case of him not being able to carry on?

    Suggested Related FunTrivia Quizzes - 90,000 currently online

    1 Sum 41
    Do you know anything about these four crazy guys? Even if you don't know much about them, take my quiz and learn about them! I added five new questions, more interesting information and now all the questions are multiple choice! Enjoy!
    Sum 41 Average
    15 Q
    singnbabe
    May 29 02
    2709 plays
    2 Sum 41
    Sum 41 is one of my favourite bands, and here is a quiz on the band members and their music. This quiz is pretty easy.
    Sum 41 Average
    10 Q
    ziggy71288
    Feb 18 03
    2727 plays
    3 Sum 41
    How much do you know about rock band Sum 41? This quiz will test your knowledge!
    Sum 41 Average
    10 Q
    marchmadness
    Aug 26 02
    3120 plays




    "Ask FunTrivia" is for entertainment purposes only, and answers offered are unverified and unchecked by FunTrivia. We cannot guarantee the accuracy or veracity of ANY statement posted. Feel free to post an updated response if you feel that an answer is inadequate or incorrect. Please thoroughly research items where accuracy is important to you using multiple reliable sources. By accessing our website, you agree to be bound by our terms of service.