Thread: Help needed with a problem

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    9

    Help needed with a problem

    Help needed with a problem-whatsapp-image-2017-12-13-11-00-12-am-jpg
    I just need this code. I can not succeed to write it cause I do not know c language. I use bash, python and lua but no idea about this programming language. This is a homework (my brother's) could you please help me. Thank you.

  2. #2
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,787
    This is homework suitable for week one of a course in programming and C. Tell your brother to stop being a lazy twat

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    What's with the sudden trend of "my friend" or "my brother" or "my pet hamster" is having problems, when it's plainly obvious that it's the OP who's having problems. This isn't 20 years ago when web access may have been an issue. People are capable of signing up for themselves without the need for an ignorant proxy.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    This is his problem yes, but just try to be a part of the solution or please don't be the part of the problem. I don't think like you. I'm a senior system administrator (linux) but never refuse a request like this. your knowledge is nothing if you don't help people with it. if I need advice of course I can get from lots of people (but not from you) .

  5. #5
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    Quote Originally Posted by Salem View Post
    What's with the sudden trend of "my friend" or "my brother" or "my pet hamster" is having problems, when it's plainly obvious that it's the OP who's having problems. This isn't 20 years ago when web access may have been an issue. People are capable of signing up for themselves without the need for an ignorant proxy.
    this goes silly, check my profile please around internet, I'm 38 YO and never use C or never need it before. This is just my brother's homework and in my country even you're not interested you have to do homeworks. He's not planning a future in IT but because of the school terms he has to do the given homework. If you want to help just help, If you won't then don't waste your or mine time. thanks.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Good to know. If he's not interested, then pass or fail is irrelevant. No need to waste our time on an empty future.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Still doesn't explain why he can't sign up for himself.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    got no internet at home..

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Well, if we give you the benefit of the doubt, the same homework guidelines still apply: get your brother to make a best attempt at the assignment, and then come back here (via you) with specific questions, e.g., help with solving some compile error on his best attempt program, in which case he (via you) would provide the best attempt program code, the compile error message, and some additional info on what he tried to solve it but failed.

    If your brother cannot make even the beginnings of such an attempt, then he should find more hand holding help, e.g., go for a consultation session with his course instructors. We aren't going to simply hand out a model answer for him to cheat, and as a "senior system administrator (linux)" it would be most unprofessional of you to request that we help your brother to cheat on an academic assignment, and even more so when you claim to "never refuse a request like this".
    Last edited by laserlight; 12-14-2017 at 07:08 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    Quote Originally Posted by laserlight View Post
    Well, if we give you the benefit of the doubt, the same homework guidelines still apply: get your brother to make a best attempt at the assignment, and then come back here (via you) with specific questions, e.g., help with solving some compile error on his best attempt program, in which case he (via you) would provide the best attempt program code, the compile error message, and some additional info on what he tried to solve it but failed.

    If your brother cannot make even the beginnings of such an attempt, then he should find more hand holding help, e.g., go for a consultation session with his course instructors. We aren't going to simply hand out a model answer for him to cheat, and as a "senior system administrator (linux)" it would be most unprofessional of you to request that we help your brother to cheat on an academic assignment, and even more so when you claim to "never refuse a request like this".
    thanks, but the due date is tomorrow. I really don't know where he fails, and don't know what is the problem with his study. I'm not living with my brother, and in a different city (because I'm married and working - and it's too silly that I have to explain) I just know he can not succeed after attempts. And the only thing I can help him right know to give him a working code so that he can fix his side. This is not academic assingment it's just high school homework (class 2).. So this is not cheating this is simply give a hand to a man needs help. Don't waste time giving advices really. If I need advices I won't be here. Why you waste YOUR time for writing answers like this ? What you gain ? what I gain ? what others do ? If you don't want to help it's ok don't help, ignore the topic it's very easy...
    Thank you.

  11. #11
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by enderulusoy
    Why you waste YOUR time for writing answers like this ? What you gain ?
    As in my previous post? I was hoping to gain someone who might actually pick up an interest in programming after getting proper help.

    Unfortunately, it looks like your brother should have sought help earlier, so sadly for this assignment the right thing to do is to accept failure and learn from it in the future.

    Quote Originally Posted by enderulusoy
    If you don't want to help it's ok don't help
    I want to help, I just don't want to help people cheat. Receiving proper help and cheating are rather different things, and contrary to your claim, just getting an answer dump to submit as the homework answer is cheating.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  12. #12
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    Quote Originally Posted by laserlight View Post
    As in my previous post? I was hoping to gain someone who might actually pick up an interest in programming after getting proper help.

    Unfortunately, it looks like your brother should have sought help earlier, so sadly for this assignment the right thing to do is to accept failure and learn from it in the future.


    I want to help, I just don't want to help people cheat. Receiving proper help and cheating are rather different things, and contrary to your claim, just getting an answer dump to submit as the homework answer is cheating.
    All right; I'll go on your way. You're just being another shadow personality just exists on net, nothing more for me . Ignorance makes quality. But as I've seen you think you have to answer and you behave like you have to give advices... This shows no quality at all. Everybody knows here the facts you've told. But this doesn't make sense. Repeating again, ignorance is quality. Don't sell me the same apple on my basket. You don't have to answer, do not have to write, do not have to waste your time (and mine), I got the homework done BTW. If requested I can post it here. Someone sends me the soution. Don't tell me success stories or talk about the future.. I do not need your opinions about the life truths. If you have something to say then write it on your personal blog. Thank you. This was just a basic help request nothing more.And :-) sorry for my english (not native on it)

  13. #13
    Registered User
    Join Date
    Dec 2017
    Posts
    1,631
    Quote Originally Posted by enderulusoy View Post
    Everybody knows here the facts you've told.
    Everybody here also knows that you are a liar and it was your homework all along.
    Have a nice life, cheater.

  14. #14
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    Quote Originally Posted by john.c View Post
    Everybody here also knows that you are a liar and it was your homework all along.
    Have a nice life, cheater.
    yes, if we were in 1999 (when I was in university)
    https://www.linkedin.com/in/ender-ulusoy-aa339a127/
    Last edited by enderulusoy; 12-14-2017 at 08:52 AM.

  15. #15
    Registered User
    Join Date
    Dec 2017
    Posts
    9
    1)
    Code:
    
    intmain(){
        intA[10];
       for(inti= 0;i< 10;++i){
    printf("Enter%i.Number:",i+1);
           scanf("%d",&A[i]);
       }
    
    
       for(intj= 0;j< 10;++j){
    printf("%d",A[j]);
           printf("-");
       }
    
       return0;
    }



    2)

    Code:
    
    intcount_interval(intA[],int*last,intlower,intupper){
        intn= sizeof(A)/ sizeof(int);
       intcounter=0;
       for(inti= 0;i< n;++i){
            if(lower<=A[i] && upper>=A[i])
    counter++;
           
            if(i+1==n)
    last=&A[i];
       }
    
       returncounter;
       
    }
    
    



    3)
    Code:
    intv= 0;
    voidprint_last_reverse(charstr[]){
        intsize= 0;
       intlastSpace= 0;
       while(str[size]!= '\0'){
            if(str[size]== '')
    lastSpace = size;
           size++;
       }
    size--;
       if(lastSpace== 0)lastSpace--;
       if(v!= 0)
    printf("");
    
       for(inti= size;i> lastSpace;i--){
    printf("%c",str[i]);
       }
    
    v++;
    }


    4)


    Code:
    
    intcount_first(charstr[])
    {
       charfirstChar=str[0];
       intcount=0;
       intsize=0;
       while(str[size]!='\0')
    {
            if(firstChar==str[size])
    count++;
           size++;
       }
    
       returncount;
    
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stuck on a problem. Help needed please.
    By sdbuilt in forum C Programming
    Replies: 5
    Last Post: 09-05-2012, 11:06 PM
  2. Help needed (problem with basic C program)
    By EpicYuzer in forum C Programming
    Replies: 15
    Last Post: 11-11-2010, 05:38 PM
  3. Coding Problem-Help needed
    By taimurdar in forum C Programming
    Replies: 4
    Last Post: 07-07-2005, 09:47 AM
  4. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM

Tags for this Thread