Search This Blog

Monday, 7 March 2022

Practical No.12: Write a program to read 10 numbers and sort them into ascending order

ACTIVITY 12

Practical No.12:
Write a program to read 10 numbers and sort them into ascending order.







OR

By Sir Sajjad Akber Chandio



ALGORITHM

  • step 1: start
  • step 2: Declare variables for loop
  • step 3: Define an array of 10 value
  • step 4: Input ten value stored in defined array
  • step 5: Using sort function to sort array value (Note: Values are stored in array in ascending order)
  • step 6: Print array contents from 0 to 9 sorted value in ascending order
  • step 7: End







No comments:

Post a Comment