Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V 2 #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

V 2 #17

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions DFS.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include<bits/stdc++.h>
using namespace std;

// Graph class represents a directed graph
// using adjacency list representation

// Graph class represents a directed graph using adjacency list representation
class Graph {
int V; // No. of vertices

Expand Down
32 changes: 17 additions & 15 deletions dataabstruction.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
#include <iostream>
using namespace std;
class Sum
{
private: int x, y, z; // private variables are providing data abstraction in this program


class Sum{
private: int x, y, z; // private variables are providing data abstraction in this program
public:
void add()
{
cout<<"Enter two numbers: ";
cin>>x>>y;
z= x+y;
cout<<"Sum of two number is: "<<z<<endl;
}
};
void add()
{
cout<<"Enter two numbers: ";
cin>>x>>y;
z= x+y;
cout<<"Sum of two number is: "<<z<<endl;
}
};

int main()
{
Sum sm;
sm.add();
return 0;
}
Sum sm;
sm.add();
return 0;
}