Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Data Structures and Algorithms: An Introduction 81
Algorithm Print_Table Ver3.
{
Step
1. Row = 1
2. Col = 1
2.1 Print the col.
2.2 Col = Col + 1
2.3 If Col <= 10 repeat steps 2.1 and 2.2
2.4 Go to a new line.
3. Row = Row + 1
4. If Row <=10 repeat steps 2 and 3
5. Stop.
}
Now our concern is “how to print a column”. We find that it is very simple, i.e., we get the value to be
printed by multiplying the values contained in the variables Row and Col. The final version of the refined
algorithm is given below:
Algorithm Print_Table Ver4.
{
Step
1. Row = 1
2. Col = 1
2.1 ColVal = Row * Col
2.2 Print the ColVal.
2.3 Col = Col + 1
2.4 If Col <= 10 repeat ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582