Search:

Type: Posts; User: Rasher

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,748

    just working through my logic on paper and...

    just working through my logic on paper and realised its wrong which puts me back to square one anyone have any ideas?
  2. Replies
    7
    Views
    1,254

    i tried using islower and had no succcess maybe i...

    i tried using islower and had no succcess maybe i did it wrong


    (islower(guess))
  3. Replies
    4
    Views
    1,748

    just read your post again and can already see...

    just read your post again and can already see thats not what you ment
  4. Replies
    4
    Views
    1,748

    i tried this and failed int a=0;...

    i tried this and failed


    int a=0;
    int i;
    int j;
    for(i=0;i<4;i++)
    {
    if(userguess[0]==answer[i])
    {
  5. Replies
    4
    Views
    1,748

    Comparing 2 char arrays

    im in the final stages of writing mastermind and im down to the white pegs
    i have 2 char arrays with 4 elements in each i.e

    userguess[4]
    answer[4] the answer is randomly generated

    i need to...
  6. Replies
    7
    Views
    1,254

    i have temp fixed it to work if there is a better...

    i have temp fixed it to work if there is a better way please let me know


    for(i=0;i<n;i++)
    {
    cout <<"\nPlease enter guess " << i+1 << " ";
    cin >> guess[0];
    while(guess[0]>=91)
    {...
  7. Replies
    7
    Views
    1,254

    sorry it compiles fine what i wanted it to do was...

    sorry it compiles fine what i wanted it to do was if they entered a lowercase char into guess[0] to prompt them to enter a capital and loop until they entered a capital. At the moment it accepts both...
  8. Replies
    7
    Views
    1,254

    testing and correcting lowercase

    hey guys im trying to test for lowercase and prompting user to enter uppercase this is what i have done but does not work any help would be appreciated thanks


    for(i=0;i<n;i++)
    {
    cout...
  9. Thread: Show me tell me

    by Rasher
    Replies
    5
    Views
    950

    i know this is probably not the correct way to...

    i know this is probably not the correct way to have done it but this seems to work


    #include<stdio.h>
    int main()
    {
    int days = -1;
    char quit = 'c';

    printf("Insert days to convert into...
  10. Thread: Show me tell me

    by Rasher
    Replies
    5
    Views
    950

    sorry thats me not being very clear again! i...

    sorry thats me not being very clear again!
    i would like the loop to terminate on just one letter such as 'q'
  11. Thread: Show me tell me

    by Rasher
    Replies
    5
    Views
    950

    Show me tell me

    ok this is one thing i cannot get my head around and im sure its easier than im trying to make it in my head


    #include<stdio.h>
    int main()
    {
    int days;

    printf("Insert days to convert into...
  12. Replies
    7
    Views
    1,666

    Ok thanks thats what i thought

    Ok thanks thats what i thought
  13. Replies
    7
    Views
    1,666

    Thanks the for loops are actually starting to...

    Thanks the for loops are actually starting to make sense now, i thought i would have to declare the variable letters before the loop

    I understand about the -1 being the terminating zero and now...
  14. Replies
    7
    Views
    1,666

    ok it works now i used gets() instead of scanf...

    ok it works now i used gets() instead of scanf although im still not too sure why scanf wouldnt work? i think its because scanf() stops processing at the first space so it wouldnt read both names,...
  15. Replies
    7
    Views
    1,666

    Ok my bad when i compile the second lot of code...

    Ok my bad when i compile the second lot of code it asks for your name then the program terminates it does not then print it backwards.
    as for the (int)strlen(name) ive only done c for about a week...
  16. Replies
    7
    Views
    1,666

    another for loop problem

    hi folks could someone guide me on this
    ive written a program that prints a character array backwards, if i state the character array it works fine
    insert


    #include<stdio.h>
    #include<string.h>...
  17. Replies
    3
    Views
    930

    Thanks

    thanks i solved it by doing the following
    input

    #include<stdio.h>
    int main()
    {
    int num;
    int go;
    printf("please enter a integer: ");
    scanf_s("%i",&num);
  18. Replies
    3
    Views
    930

    for loop problem?

    i have this really annoying problem that i just cant figure out!
    im sure its quite simple, i need to get a number from the user then print the number up to the next 15 places so if i enter 10 it...
Results 1 to 18 of 18