Thread: some time to spare?

  1. #16
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    would it be possible to write the exact fprintf statement, just this once?

  2. #17
    Registered User
    Join Date
    Sep 2007
    Posts
    104
    Do NOT help this person, he has copied word by word ( just changed some variable names ) a bunch of code that I posted on this site for an assignement to get help , and this has costed me in getting a zero for that assignement . He is not here to learn but to get easy answers , just look at his other threads.


    Quote Originally Posted by juststartedC View Post
    Hi, i was wondering if there is anyone out there kind enough to do the following code for me. i have no idea where to start since i dont know much about arrays.This is what the program should do:

    1) Prompt for and then accept 10 floating point values from the
    user.
    2) Store these values in an array.
    3) Pass the array to a procedure which prints out the values to
    4 decimal places in a numbered fashion (i.e like line numbers).
    4) Pass the array to a function which returns the maximum value.
    5) The returned maximum value is printed out in scientific or
    exponential format along with a suitable heading.


    Can someone please write the whole code???
    This is only a test code so its just so i get an idea, the main code is totally different
    Thanks

    Quote Originally Posted by juststartedC View Post
    Hi people.

    We are handing in our code as a university assignment. all the students get as much help as possible from each other and we even have some similar codes (please bare in mind that this is our first time writing a code) , however, the lecturer has mentioned that students are not allowed to copy each others work or even get help, he claims he has a very good software that checks and finds out if people cheated. i was wondering how the program works (i.e. if it looks at the name of the variables or the structure etc) and if it is possible to trick it (not that i have copied from anyone ) just out of curiosity.

    Any help would be greatly appreciated

    Thank you

  3. #18
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    I think you are mistaking me for some one else because i did not copy your code, if i did i would have got a zero aswell.

  4. #19
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    Thanks for the link robwhit, so this is it right?

    fprintf(output,"hello world.\\nHow are you?");

  5. #20
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by juststartedC View Post
    Thanks for the link robwhit, so this is it right?

    fprintf(output,"hello world.\\nHow are you?");
    yes. You should really get a compiler on a computer. Does your school have a computer lab?

  6. #21
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    yes we do but it would be very time consuming for me to go there every time. one more question,

    Now say this time we need to out put an integer variable height but with a '%' before it, would this do it:

    fprintf(output,"%%d", height);

  7. #22
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    do this

    Code:
    fprintf(output,"%%%d", height);
    ssharish

  8. #23
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    Im at uni right now and i gota compiler, urs works but why do we need three'%'

  9. #24
    lfs addicted
    Join Date
    Nov 2007
    Posts
    49
    Quote Originally Posted by juststartedC View Post
    Im at uni right now and i gota compiler, urs works but why do we need three'%'
    because %% means % and %d is for "the integer you want to print".

  10. #25
    Registered User
    Join Date
    Sep 2007
    Posts
    54
    Thank you very much

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers
    By Big_0_72 in forum C Programming
    Replies: 3
    Last Post: 10-28-2008, 07:51 PM
  2. Sending an email in C program
    By Moony in forum C Programming
    Replies: 28
    Last Post: 10-19-2006, 10:42 AM
  3. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  4. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM