To calculate the average of odd numbers till n we can use a mathematical formula (n+1)/2 where n is an odd number which is the given condition in our problem.Program to calculate the average of odd natural numbers till n −Example Code...
1, 5, 10, 10, 5 and 1 which can be either calculated using the formula 5Cr5Cr where r ranges from 0 to 5 or using the Pascal's triangle. The number of odd terms in the 5th row of Pascal's triangle are 4 i.e. 1, 5, 5 and 1 which is the required output. Input N=10 ...
1183A-NearestInterestingNumber.cpp 1183B-EqualizePrices.cpp 1183C-ComputerGame.cpp 1183D-CandyBoxEasyVersion.cpp 1184A1-HeidiLearnsHashingEasy.cpp 1184B1-TheDoctorMeetsVader.cpp 1184D1-ParallelUniversesEasy.cpp 1185A-Ropewalkers.cpp 1185B-EmailFromPolycarp.cpp 1185C1-ExamInBerSUEasyVersion.cpp 1185C2...