You are on page 1of 7

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

GOVERNMENT POLYTECHNIC OSMANABAD

MICRO PROJECT
ACADEMIC YEAR: 2021-2022

TITLE OF MICROPROJECT:-
DEVLOP PROGRAM TO SOLVE THE PROBLEM OF
TOWER OF HANOI

Program code:- CO3I


COURSE=DSU

Program Code:- CO3I


Course :- DSU
Details of group:-

Sr Roll no Name of students Enrollment no


no.
1 72 Shinde Atish Anil 2101180303
2 71 Chatur Saurabh 2101180304
Babasaheb
3 76 Garad Akash Santosh 2101180299

Acknowledgements

I would like to express my special thanks of gratitude to my


teacher as well as our principal who gave me the golden
opportunity to do this wonderful project on the topic To
solve the problem of tower of hanoi, which also helped me
in doing a lot of Research

I came to know about so many new things. Thank my


friends & my group members who helped me a lot in
finalizing this project within the limited time. I am really
thankful to them.
Index

Sr.no Title
0.1 Relational
0.2 Aim of the microproject
0.3 Course outcomes
0.4 Literature review
0.5 Actual methodology Followed
0.6 Actual resources used
0.7 Output of microproject
0.8 Skill development
0.9 Application of microproject
Micro Project Report
TITLE:- DEVLOPE PROGRAM TO SOLVE THE PROBLEM
OF TOWER OF HANOI

1 Relational :-
We are very happy to this project. This project is about to solve the
problem of tower of Hanoi.

0.2 Aim/Benefit of the Micro Project:-


Aim of the project is the solve the problem obtained by tower of hanoi
in data structure using c language. And make it easier to use.

1.3 Course outcome addressed:-


 We learn the tower of Hanoi puzzle.
 We use online compiler to solve this puzzle.
1.4 Literature Review :-
Learning data structures is complex issue for many students and complexity is
defined as a problem that can have several solutions. Some of the complex
problems in the computational areas include; teaching programming, algorithms
and data structures, among others. Data structure is an important subject for 2nd
year students , but it is difficult to work with them due to their abstract nature.
Interactive tools are created to make data structures learning easy and interesting.
While using these tools, they understand how the algorithm works and how the
operations (insertion, deletion, searching, traversal, merging, etc.) are executed

0.5 Actual Methodology Followed:-


Source Code:-

Coding

/ * C program for Tower of Hanoi using Recursion


*/
#include <stdio.h>

void towers(int, char, char, char);

int main()
{
int num;

printf("Enter the number of disks : ");


scanf("%d", &num);
printf("The sequence of moves involved in the Tower of Hanoi
are :\n");
towers(num, 'A', 'C', 'B');
return 0;
}
void towers(int num, char frompeg, char topeg, char auxpeg)
{
if (num == 1)
{
printf("\n Move disk 1 from peg %c to peg %c", frompeg, topeg);
return;
}
towers(num - 1, frompeg, auxpeg, topeg);
printf("\n Move disk %d from peg %c to peg %c", num, frompeg,
topeg);
towers(num - 1, auxpeg, topeg, frompeg);
}
Outcome-:

You might also like