Search:

Type: Posts; User: Alexie

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    4,046

    Okay thanks. I will try to code out myself first....

    Okay thanks. I will try to code out myself first. It is good to learn something new. :)
  2. Replies
    17
    Views
    4,046

    Yup it is a assignment. But i want to code out a...

    Yup it is a assignment. But i want to code out a easiest way cause i don't really understand the top part.


    int end = length - 1;
    for (int i = 0; i < length; ++i)

    {
    for (int...
  3. Replies
    17
    Views
    4,046

    well i found merging number is way simple than...

    well i found merging number is way simple than character. i have no idea how to start coding. :confused:

    Ops: sorry for misunderstanding. any method will do as what my lecturer told me. :cool: But...
  4. Replies
    17
    Views
    4,046

    Merge and sort array.

    Hi all. basically I need to hand up a project on merge and sort array in char.
    First input: a c e g
    Second input: b d f h
    Output: a b c d e f g h
    I found this code using bubble sort. But i...
  5. Replies
    4
    Views
    1,089

    #include #include #include...

    #include <stdio.h>
    #include <conio.h>
    #include <stdlib.h>
    int main()
    {
    int array[100], num1, c, n, num2;

    printf("Enter number of elements in array\n");
    scanf("%d", &n);
  6. Replies
    4
    Views
    1,089

    How can we input -1 to stop program?

    how can do a code for -1 to stop program?



    printf("Enter number of elements in array\n");
    scanf("%d", &n);

    printf("Enter %d elements\n", n);

    for ( c = 0 ; c < n ; c++ )
  7. Replies
    13
    Views
    1,260

    can someone check with my coding? #include...

    can someone check with my coding?


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
    #include <conio.h>

    int main()
  8. Replies
    27
    Views
    2,939

    OK thanks . i manage to solve the problem already...

    OK thanks . i manage to solve the problem already :)
  9. Replies
    27
    Views
    2,939

    i have do a research on inword = 1; else inword =...

    i have do a research on inword = 1; else inword = 0; that all the number and char = 1 and space = 0; how can i do it on my code?
  10. Replies
    27
    Views
    2,939

    After looking at the code again. I think i got a...

    After looking at the code again. I think i got a problem with it again.


    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    #include <ctype.h>

    int main()
    {
  11. Replies
    13
    Views
    1,260

    Erm. Can someone help me on the coding? so...

    Erm. Can someone help me on the coding? so example the loop is ( int i =0; i<=n; i++) how can i stop the loop at middle?
  12. Replies
    13
    Views
    1,260

    Oh thanks. Okay i take a try first. :wink:

    Oh thanks. Okay i take a try first. :wink:
  13. Replies
    13
    Views
    1,260

    whats the different between string and linked...

    whats the different between string and linked list? cause i thought we have input a sentence after that look for middle word of the sentence.

    char str[50]
    printf("\n\n\t Enter A...
  14. Replies
    13
    Views
    1,260

    actually this is my tomorrow lab test question. i...

    actually this is my tomorrow lab test question. i really can't figure out this coding. how can we calculate the middle of the string?
  15. Replies
    13
    Views
    1,260

    yup. example i input a sentence: hello my name is...

    yup. example i input a sentence: hello my name is alex. so i will get the output: name <-- middle in the list.
  16. Replies
    13
    Views
    1,260

    Print middle of a given list

    How can i print the middle of given list?
    example:
    Input: aaa bbb ccc ddd eee
    Output: ccc

    how can this code to be done? :confused::confused:
  17. Replies
    4
    Views
    791

    so that mean -1 is somewhat of delete right? if i...

    so that mean -1 is somewhat of delete right? if i want delete second element will be 2-1? how about i+1?
  18. Replies
    4
    Views
    791

    Need explanation on coding.

    printf("\nEnter location of deletion: ");
    scanf("%d", &loc);

    item = a[loc-1];
    for(i=loc-1; i<n; i++)
    {
    a[i] = a[i+1];
    }
    ...
  19. Replies
    27
    Views
    2,939

    Thanks for that too. good idea:wink:

    Thanks for that too. good idea:wink:
  20. Replies
    27
    Views
    2,939

    Hey Adak! Thanks for your explanation. I got my...

    Hey Adak! Thanks for your explanation. I got my code working.


    if((str[i]== ' ' && str[i+1] != ' ' && inWord++ ))
    and also
    printf("\n\nThe total number of words are %d ",...
  21. Replies
    27
    Views
    2,939

    i did use for counting space ...

    i did use <ctype.h> for counting space


    while(str[len]!='\0') len++;
    for(i=0;i<=len;i++)
    {
    while( isspace( str[i] )) { space++; i++; }
    {continue;}
    ...
  22. Replies
    27
    Views
    2,939

    Oh. so how should i code to let the program know...

    Oh. so how should i code to let the program know it begin with a space?
  23. Replies
    27
    Views
    2,939

    I manage to solve the first error by change the...

    I manage to solve the first error by change the line to:
    if((str[i]== ' ' && str[i+1] != ' '))

    Input: a[space][space][space]d
    Output: 2 words

    But the next problem I can't solve is:

    Input:...
  24. Replies
    27
    Views
    2,939

    Ok thanks alot. I will try to get a copy soon :)

    Ok thanks alot. I will try to get a copy soon :)
  25. Replies
    27
    Views
    2,939

    I don't have any book to learn. I was learn it...

    I don't have any book to learn. I was learn it through youtube.
Results 1 to 25 of 28
Page 1 of 2 1 2