Find Jobs
Hire Freelancers

Solve a C++ task

$10-30 USD

Закрито
Опублікований about 4 years ago

$10-30 USD

Оплачується при отриманні
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
ID проекту: 24053381

Про проект

30 пропозицій(-ї)
Дистанційний проект
Активність 4 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
30 фрілансерів(-и) готові виконати цю роботу у середньому за $27 USD
Аватарка користувача
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 за 1 день
5,0 (867 відгуки(-ів))
7,5
7,5
Аватарка користувача
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 за 1 день
4,9 (172 відгуки(-ів))
7,1
7,1
Аватарка користувача
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 за 1 день
4,9 (125 відгуки(-ів))
7,0
7,0
Аватарка користувача
Hi I can deliver you the fix code for the given output. Kindly contact to discuss more about the project. Thank you
$30 USD за 1 день
4,9 (67 відгуки(-ів))
6,0
6,0
Аватарка користувача
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 за 7 дні(-в)
4,9 (177 відгуки(-ів))
6,1
6,1
Аватарка користувача
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 за 1 день
4,9 (124 відгуки(-ів))
5,8
5,8
Аватарка користувача
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 за 1 день
5,0 (41 відгуки(-ів))
5,9
5,9
Аватарка користувача
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 за 1 день
4,7 (19 відгуки(-ів))
5,1
5,1
Аватарка користувача
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 за 1 день
4,8 (33 відгуки(-ів))
4,5
4,5
Аватарка користувача
i can help.........................................................................................................................
$20 USD за 7 дні(-в)
4,9 (19 відгуки(-ів))
4,4
4,4
Аватарка користувача
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 за 7 дні(-в)
5,0 (9 відгуки(-ів))
3,4
3,4
Аватарка користувача
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 за 1 день
4,9 (3 відгуки(-ів))
2,3
2,3
Аватарка користувача
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 за 1 день
5,0 (1 відгук)
1,9
1,9
Аватарка користувача
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 за 7 дні(-в)
5,0 (2 відгуки(-ів))
2,0
2,0
Аватарка користувача
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 за 1 день
4,7 (10 відгуки(-ів))
2,2
2,2
Аватарка користувача
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 за 1 день
5,0 (1 відгук)
0,4
0,4
Аватарка користувача
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 за 7 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
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 за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
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 за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
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 за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор POLAND
Warsaw, Poland
0,0
0
На сайті з лют. 23, 2020

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.