Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 7: LOOPING CONTROL STRUCTURES-II 1. To generate the multiplication table for n numbers up to k terms [Ex: 1 x 1 = 1 2

image text in transcribed
Lab 7: LOOPING CONTROL STRUCTURES-II 1. To generate the multiplication table for n numbers up to k terms [Ex: 1 x 1 = 1 2 x 1 = 2 3 x 1 = 3 .... 1x 2 = 2 2 x 2 = 4 3 x 2 = 6 .... 1 x 3 = 3 2 x 3 = 6 3 x 3 = 9.... ......] 2. To generate Floyd's triangle using natural numbers for a given N. [Hint: Floyd's triangle is a right angled-triangle using the natural numbers] Ex: Input: N=4 Output: 1 23 4 5 6 7 8 9 10 3. To check all the numbers from 1 to N and display only those numbers for which the sum of the cubes of all the digits equals the number itself (Armstrong Number). 4.To check whether the given number is strong or not. [Hint: Positive number whose sum of the factorial of its digits is equal to the number itself] Ex: 145 = 1! +4! + 5! = 1 + 24 + 120 = 145 is a strong number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions