No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
#include <cstdlib> #include <iostream> using namespace std; int main() { float op1,op2,answer; char op; cout<<"Entre the first numper"; cin>>op1; cout<<"/nEnter the operation"; cin>>op; cout<<"/nEntre the second numper"; cin>>op2; if(op=='+') answer=op1+op2; if(op=='-') answer=op1-op2; if(op=='*') answer=op1*op2; if(op=='/') answer=op1/op2; else cout<<op1<<op<<op2<<" = "<<answer; system("PAUSE"); } |
|
Re:
Hi, i'm trying to delete last node of linked list and print the remaining list at each step. for this i created 'Print' function. please take a look at this code: struct Node{ int data; Node *next; }; void Print(Node *head){ if(head==0) return; else{ Node *temp=head; Node *prev=head; while(temp!= NULL){ … |