Find Jobs
Hire Freelancers

C program in Linux environment

₹600-1500 INR

Closed
Posted over 8 years ago

₹600-1500 INR

Paid on delivery
The below program giving wrong output when negative integer entered at command line for two consecutive times . can we correct that? #include <stdio.h> #include <unistd.h> int main() { int number = 0, status; pid_t pid; printf("Please enter a number n"); scanf("%d", &number); if(number<0) { printf("Please enter a positive number, greather than 0 n"); scanf("%d", &number); } pid = fork(); if(pid < 0) { printf(" Unsuccessful to create Child Process n"); return 0; } else if(pid == 0) { printf("%d ",number); do { if(number%2 != 0) { number = (number*3)+1; } else if(number%2 == 0) { number = number/2; } printf("%d ",number); }while(number != 1); } else { printf("\npid %d ",pid); wait(&status); } return 0; }
Project ID: 8584545

About the project

55 proposals
Remote project
Active 8 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
55 freelancers are bidding on average ₹1,088 INR for this job
User Avatar
Hello... When the user introduces the second time a negative value, what should you do?... test again if the number if negative? ... how many times will you ask to the user "Please enter a positive number?..."... because, it seems like you need to use a LOOP. I can help you right now. I havce 20 years programming in c/c++ with master and Phd. So, let me help you. Best regards!.
₹1,500 INR in 2 days
5.0 (87 reviews)
7.1
7.1
User Avatar
I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used c++ to make many great projects, for example, I made the tools which can convert java files to c++ scripts which has the same effect, of course garbage collection included. I also made our own mobile game using c++, I even can show you the demo of client. Trust me, please let expert help you.
₹5,000 INR in 1 day
4.9 (116 reviews)
6.8
6.8
User Avatar
please put in description info what exactly the program was supposed to do?
₹850 INR in 2 days
5.0 (82 reviews)
6.3
6.3
User Avatar
Figured out the issue ur facing the problem with standard input while forking feel free to contact me #####################################################################
₹1,300 INR in 1 day
5.0 (32 reviews)
5.2
5.2
User Avatar
Hi, You have a very basic error in your code abdout how to handle numbers from command line input. I can fix that and explain to you. (and show you a demo of code running locally) Contact me back if interested. Cheers
₹1,250 INR in 1 day
5.0 (18 reviews)
5.0
5.0
User Avatar
Computer Sciencce student in his last year. Plenty of experience with programming languages like c++. I have identified the problem with the source code and can help you fix it
₹750 INR in 1 day
5.0 (14 reviews)
4.6
4.6
User Avatar
Hello I have 25+ years of C/C++ programming experience, 10 years as freelancer 300+ projects completed. · I´ll send you a full tested and documented program (in code). · Unlimited cycles of revision in the agreed time period. · Full advice about the best way to do the implementation. Please contact me to discuss the details.
₹1,500 INR in 1 day
4.8 (29 reviews)
4.9
4.9
User Avatar
hi i can help
₹1,250 INR in 1 day
5.0 (33 reviews)
4.7
4.7
User Avatar
A proposal has not yet been provided
₹1,050 INR in 1 day
4.7 (18 reviews)
4.9
4.9
User Avatar
Hello. More 20 years programming experience. I need more details to set real time and price. Regards. ---------------------------------------------------------------------------------------------------------------------------------------------------
₹1,300 INR in 1 day
4.8 (12 reviews)
4.4
4.4
User Avatar
Hello I am Software Developer working on Web & Desktop applications (C# expert developer) Languages , We are working on : C#.Net, VB.Net, Android, Java, C, C++, PHP, Java script, JQuery, Ajax, HTML etc... Database : SQL SERVER / Oracle / MS-Access / Text / SQLite My good points: - Master Degree in Computer Science - 3+ Years of experience - Delivered before time - My good habit is to leaving comment on each important lines. - More about me you can view my portfolio ------------------------------------ if you have any confusion, Feel free to ask Lets discus your project
₹1,500 INR in 1 day
5.0 (13 reviews)
3.7
3.7
User Avatar
Hi, This is a very simple mistake which I found by simply seeing,and that is big blunder I am a student in Indian Institute of technology madras (IIT) and have very good experience in c programming,if given the task i could finish it 5 minutes and give you back,and pay only when it works perfectly hope you give me the project
₹850 INR in 0 day
5.0 (5 reviews)
3.8
3.8
User Avatar
Hi, my name is Tom Uffner. I am an expert C/C++ developer, and I am very familiar with writing code for Linux. I have already fixed the problem, I can give you the solution as soon as you hire me When you hire me I will complete your program quickly and correctly. Thank you for considering this bid, tom
₹1,300 INR in 1 day
5.0 (6 reviews)
3.5
3.5
User Avatar
Hello. I have a lot of experience with C, I've checked and executed your code and I know how to fix it (it's very easy).
₹1,150 INR in 1 day
4.9 (8 reviews)
3.3
3.3
User Avatar
Hi,sir. I was interested when I saw your project. I can complete your project nicely. My skills are C, C++, Reversing, Matlab & Mathematics, Web scraping,Algorithm. I can help you very kindly. I can help you good. Best regards. Thank you.
₹1,300 INR in 1 day
4.7 (3 reviews)
2.5
2.5
User Avatar
Hey .. I have already solved the problem.. Ping me when u available.. i will give u the fixed code.. U can inbox me at any time.
₹750 INR in 1 day
4.0 (1 review)
3.0
3.0
User Avatar
Hello, I have over 6+ years of experience in C programming. I can correct your program to work properly. There is a condition which you need to add. I can tell correct the program and share corrected code with you immediately. Kindly ping me if you are interested. Prize quoted is negotiable.
₹600 INR in 0 day
4.6 (6 reviews)
2.3
2.3
User Avatar
Hello. The program asks for positive number as an input. So should I completely prohibit negative input numbers or what ? Best regards.
₹1,250 INR in 1 day
4.7 (2 reviews)
1.7
1.7
User Avatar
Just change if(number<0) to: while (number<0) You can hire me to help you out with the rest of the code... or just keep the solution.
₹600 INR in 0 day
5.0 (6 reviews)
1.8
1.8
User Avatar
A proposal has not yet been provided
₹1,250 INR in 1 day
5.0 (4 reviews)
2.0
2.0

About the client

Flag of UNITED STATES
United States
5.0
7
Payment method verified
Member since Sep 18, 2015

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.