Question
Data structures: In C++ write a simple code to insert, delete and print using while if and for loops, no classes. Have user input data
Data structures: In C++ write a simple code to insert, delete and print using while if and for loops, no classes.
Have user input data with cout and cin. and have the user clarify using ('P' 'I' or 'D' which operation they want for the node) Ex. if(letter='D', ){
Include a counter for nodes counter-1 for delete and counter +1 for insert.
this is what i have so far.
#include
int counter=0;
struct node { int info; node* link; };
cout<<"Enter I-insert P-print D-delete node"<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started