Find Jobs
Hire Freelancers

Solve a C++ task

$10-30 USD

Closed
Posted about 4 years ago

$10-30 USD

Paid on delivery
I want to know why these c++ code is not returning the required output? #include <iostream> using namespace std; char matrix[100][100]; int main() { int n,i,j; cin>>n; for(i=0;i<n;i++){ for(j=0;j<n;j++) { cin>>matrix[i][j]; } } int cycle = 1; for(i = 0; i<n && cycle == 1;i++) { for(j = 0; j<n && cycle == 1; j++) { if(i == j) { if(matrix[i][j] == '1') { cycle = 0; break; } } if(matrix[i][j] == '1' && matrix[j][i] != '1') { cycle = 0; break; } } } cout<<cycle; return 0; /* 011 // 101 110 0110000 1010000 1100000 0000101 0001010 0000101 0001010 0100001 1010000 0101000 0010100 0001010 0000101 1000010 */ } This was the question. I finish coding but it simply does not return the desired output: Cycles Is a graph denoted by the adjacency matrix a cycle graph? Input In the first line: a number of next lines. In a line (expect the first): a number of vertices and after space an adjacency matrix written from the left to the right and from the top to the bottom. Output 1 if a graph is a cycle, 0 else. Example Input 5 3 011101110 7 0110000101000011000000000101000101000001010001010 7 0100001101000001010000010100000101000001011000010 5 0101010000000011000000100 5 0100110010000110110010100 Output 1 0 1 0 1
Project ID: 24053381

About the project

30 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
30 freelancers are bidding on average $27 USD for this job
User Avatar
Hi there, I do C programming and have good command in data structures and algorithms. I went through your requirements and I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details.
$30 USD in 1 day
5.0 (867 reviews)
7.5
7.5
User Avatar
My Degree is MS Computer Software Engineering. I teach Data structure and Algorithm. I have Excellent concepts linked lists, pointers, Trees, Binary Trees, stack and queues, FIFO, LIFO, recursion Graphs, Complexity analysis and Hashing. My programming expertise are C, C++, Java, C# and matlab. I can show you some of my previous work related to Data Structure and Algorithm. Please see my profile and reviews as well. Thanks
$30 USD in 1 day
4.9 (172 reviews)
7.1
7.1
User Avatar
I am very proficient in c and c++. I have 18 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$40 USD in 1 day
4.9 (125 reviews)
7.0
7.0
User Avatar
Hi I can deliver you the fix code for the given output. Kindly contact to discuss more about the project. Thank you
$30 USD in 1 day
4.9 (67 reviews)
6.0
6.0
User Avatar
Hello, I have 25 years experience programming in C++. Your program isn't testing for a cycle. I will create a C++ program that identifies a cycle graph. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$84 USD in 7 days
4.9 (177 reviews)
6.1
6.1
User Avatar
Hi, I am well versed with C++ programming and various concepts like OOP, inheritance, encapsulations, classes, methods, constructors, arrays, console applications , string handling, file manipulations, linked lists (like Stacks,Queue) etc. I have more than 15 years of working experience to my credit. I will be happy to answer any queries that you may have. Looking forward to your response. Thanks
$25 USD in 1 day
4.9 (124 reviews)
5.8
5.8
User Avatar
I, Jignesh Lakhani completed my masters from IIT Roorkee in Computer Engineering. I am having a very good knowledge of C, C++, Java, JavaFX, Algorithm and Data Structure. I am having strong analytical power. I will complete your project before the deadline. I am looking forward to discussing with you this job post. Please feel free to contact me. Respectfully, Jignesh
$30 USD in 1 day
5.0 (41 reviews)
5.9
5.9
User Avatar
Thank you for your posting job. I read your project description and I'm very interested in this project. As you can see via my profile, I have expertise skills to build C#& C++. If you hire me for this project, you will have a chance to get to know another talent and trustworthy. I hope to work with you, sincerely.
$80 USD in 1 day
4.7 (19 reviews)
5.1
5.1
User Avatar
hi, please dont share code like that. i can fix your code anyway. let me know if you are interested. thanks in advance.
$20 USD in 1 day
4.8 (33 reviews)
4.5
4.5
User Avatar
i can help.........................................................................................................................
$20 USD in 7 days
4.9 (19 reviews)
4.4
4.4
User Avatar
Hi, There. I have plenty of experience in C++, Algorithms. I can help you with this task. Have a chat about the task. I shall be glad to help you out.
$25 USD in 7 days
5.0 (9 reviews)
3.4
3.4
User Avatar
Hello Sir/Madam I am doing computer programming and development work since many years. I have practical knowledge of various programming langauges including Java Technologies, C#, C/C++, PHP, Node, Android, Python, JavaScript, Scala, Vb.Net, XML and various frameworks. I can help implement awesome desktop (Java, Python, C#, Vb.net, C++), Web (JEE, Spring, Phy, Python, Asp.net) and Android (Java, Kotlin) application. Contact me with details to get started. I assure you an excellent solution of your project within the time frame, reasonable budget and exactly according to the requirements. Please contact with details. Thanks @CodingHelpLine
$20 USD in 1 day
4.9 (3 reviews)
2.3
2.3
User Avatar
Hi, we are experienced in C language tasks. we can make it edit and we will also send you brief so that you can understand everything also. regards, Muhammad Faraz Khan AcademicsAssistant Team
$30 USD in 1 day
5.0 (1 review)
1.9
1.9
User Avatar
I have been a competitive programmer for more than 5 years. I have a big experience in algorithms and data structures. Mostly I've been coding on C++ this whole time so I think I can help you.
$30 USD in 7 days
5.0 (2 reviews)
2.0
2.0
User Avatar
Greetings Sir, I am Muhammad Faisal and i am a professional C++ Developer having almost 4 years of professional experience and we provide you quality work within your budget and time duration so, lets get started : Thanks
$20 USD in 1 day
4.7 (10 reviews)
2.2
2.2
User Avatar
I am doing Software Engineering ,Having 2 years experience especially in programming (i.e. Java,C#,C++,C,Python),Code Debugging, Database connections, App development and much more.
$15 USD in 1 day
5.0 (1 review)
0.4
0.4
User Avatar
I'm software engineer having 3 years experience in software development field and I just check the c++ program and I can easily do it for if you are interested then let me know. Thanks.
$20 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi there, I have seen your code. I'll fix this code in 30 mins max to generate the desired output. Please let me know if you are interested.
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I have gone through the program. There are a few syntax and logic errors in the code you have written. I will debug and fix it for you. I will provide you with the detailed documentation of the changes to be done to get the desired output and the reason for the changes. I will give you detailed comments in the code to help you understand the code too.
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have made too many projects on C++ which includes automation projects etc. I can easily debug the issues in c++ Relevant Skills and Experience C++ programming
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of POLAND
Warsaw, Poland
0.0
0
Member since Feb 23, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.