Skip to main content

Practical No.10 Write a program that takes a number and prints its multiples up to 10.

 

Practical No.10 Write a program that takes a number and prints its multiples up to 10.

ACTIVITY 10

Practical No.10:
Write a program that takes a number and prints its multiples up to 10.





OR

By Sir Sajjad Akber Chandio


ALGORITHM

  • step 1: start
  • step 2: Declare variables for loop and number
  • step 3: Input any number
  • step 4: Print multiples of number up to 10
  • step 5: Repeat step 4 10times (using for loop)
  • step 6: End


VIVA VOCE
ACTIVITY 10

Q.1: What is loop?
Ans: Iteration or loop in computer programming, is a process wherein a set of instructions or structures are repeated in a sequence a specified number of times until a condition is true.

Q.2: How many types of loops are there?
Ans: C++ provides the following types of loops to handle looping requirements.
1. for loop
2. while loop
3. do-while loop

Q.3: Define for loop.
Ans: A for loop is a repetition or iteration control structure that repeats a statement or block of statements for a specified number of times. The for loop is commonly used when the number of iterations is known.

Q.4: Which function is used for printing output?
Ans: tout is the most common input function in C++ used as output function.

Q.5: What are the Escape sequences in C++?
Ans: Escape sequence is a set of characters that convey a special meaning to the program.

Comments

Popular posts from this blog

Dear Students Welcome to my blog.  It is to inform you that. now you can download your 10th class Computer Science book in PDF. Share with your other students.  Kindly Share your comments on my blog to support me.                                                                                   Download

Class X Test / Model Paper Chapter No 1 Computer

                                                                                Subject: Computer Science                                          Class: -10                                        Date: 4 Jan 2023 Test   # 1   Short Test (MCQs=6, SQs=8, LQs=1)     ...

Inter Board Karachi Guess/Model Papers 2023 (1st year & 2nd year)

  Inter Board Karachi Guess/Model Papers 2023 Board Karachi Model Papers 2023 Computer's Guess Paper 9th Class 2023 Computer's Guess Paper 9th Class 2026 Computer's Guess Paper  10th Class 2023 Computer's Guess Paper 11th Class 2023 Computer's Guess Paper  12th Class 2023 Prepared By Sir Rana Arsalan Inter Part-I Model Papers Inter Part-II Model Papers Model Paper Mathematics I Model Paper Mathematics II Model Paper Islamiat Model Paper Urdu II Model Paper Urdu I Model Paper Pakistan Studies Model Paper Botany I Model Paper Botany II Model Paper Chem I — MCQs Model Paper Chem II — MCQs Model Paper Physics I Model Paper Physics II Model Paper Zoology I Model Paper Zoology II Model Paper English I Model Paper English II