Odd Triangular Numbers And Two Nonnegative Odd Integers In Succession


    Task 1: Find the odd triangular numbers that are smaller than a number specified by the user and print them. For example, if the user chooses to print all the odd triangular numbers smaller than 50, the program should print 1, 3, 15, 21, 45. The program should keep a count of how many triangular numbers were even and how many of them were odd up to the maximum given by the user and print this information too

    Task 2: Find the numbers that can be written as the product of two nonnegative odd integers in succession and print them in increasing order. For each number found the program should check whether the number is a factor of a number chosen by the user and indicate this in the output. (For example, 35 is such a number as it can be written as the product of 5 and 7 (35=5x7), which are two odd numbers in succession). The user should specify how many such numbers they want to print, starting from a minimum value.

     


    Tags:



    Related Posts


    Comments (0)

    Leave a Comment

    Type the above code here


    More from hatequizzes




    Categories


    Latest JobsAutomotiveinsuranceHow toParentingFinanceQuestions & answersEducationLoan & InsuranceGeneralHosting & DomainLaw & AttorneyHealth & FitnessHome & GardenHealth