Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~430 People Reached
Favorite Forums
Favorite Tags
Member Avatar for andrew12s

Please help me to translate this code from c to c++ #include <stdio.h> #include <conio.h> void main() { int n,i,j,a[20][20],ok=1,grade=0,aux=0;ok=1; FILE *f=fopen("c:\graph.txt","r"); fscanf(f,"%d",&n); for(i=1;i<=n;i++) for(j=1;j<=n;j++) fscanf(f,"%d",&a[i][j]); fclose(f); for(i=1;i<=n;i++) if(a[1][i]==1) grade++; for(i=1;i<=n;i++) { for(j=1;j<=n;j++) if(a[i][j]==1) aux++; if(aux!=grade) ok=0; aux=0; } if(ok==0) printf("graph is not regular."); else printf("graph is regular."); getch(); clrscr(); …

Member Avatar for rubberman
0
285
Member Avatar for andrew12s

I am a beginner with programming and I really need to resolve this problem. So, I need to implement the following class that represents this type of crowd and operations with those : class Crowd { int* element; int number; public: Crowd(int m_number, int* m_element); Crowd(Crowd&); ~Crowd(); Crowd& operator= (Crowd& …

Member Avatar for rubberman
0
145