User Profile

Collapse

Profile Sidebar

Collapse
wazzup
wazzup
Last Activity: Mar 20 '07, 11:40 PM
Joined: Feb 13 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • wazzup
    replied to Help with Permutation
    in C
    With "abc" input

    My output is: "acb", "bac", "bca", "cab" and "cba"

    But it should be like this: "acb", "bca", "bac", "cab", and "cba"
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to Help with Permutation
    in C
    This is my output:

    Code:
    Enter a string: abc
    
    Original string:
    abc
    
    Permutations:
    acb
    bac
    bca
    cab
    cba
    
    
    Press q (or any other key) followed by 'Enter' to quit:
    See more | Go to post

    Leave a comment:


  • wazzup
    started a topic Help with Permutation
    in C

    Help with Permutation

    Create a program to display all of the permutations of a string of any length. A permutation is a re-arrangement of the order of letters. For example, the string "abc" has permutations "acb", "bca", "bac", "cab", and "cba"

    Here is my code but I don't know how to re-arrangement. Please help me

    Code:
    #include <iostream>                 //Required if
    ...
    See more | Go to post

  • wazzup
    replied to How do I change this?
    in C
    yup. It's the test that how much understanding the code
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to How do I change this?
    in C
    it works. Can you explain me how it works? Pleaseee!
    Thanks much!
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to How do I change this?
    in C
    so, which line in function f1 ?
    See more | Go to post

    Leave a comment:


  • wazzup
    started a topic How do I change this?
    in C

    How do I change this?

    How do I change something in function f1 to displays the values stored in the array a in ascending order

    Code:
    13  void f1(int a[]) {
    14       const int m = 100;
    15       int b[m];
    16       for (int j = 0; j < m; ++j) b[j] = 0;
    17       for (int i = 0; i < 10; ++i) ++b[a[i]];
    18       for (int i = 0, j = 0; j < m; ++j)
    19               for (int k = b[j]; k > 0; --k) a[i++] = j;
    ...
    See more | Go to post

  • wazzup
    replied to Help me with pointer to pointers
    in C
    The compiler of BloodShed did not warning for errors but program terminate when accessing the function with that replacing. Any ideas? Many thanks for the help so far.
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to Help me with pointer to pointers
    in C
    When I tried put that code in the function, it gave me some errors such as:
    ==> declaration of 'int**arr' shadows a parameter
    ==> `col' cannot appear in a constant-expression

    How can I fix this errors?

    Code:
    /* to initialize matrix */
    int** init(int** arr,int row,int col)
    {
                   int i=0,
                       j=0;
    
    	//arr=(int**)malloc(sizeof(int)*row*col);
    ...
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to Help me with pointer to pointers
    in C
    Yeap, I'm taking CS 161, really basic stuff, this is my extra credit project. That's y my instructor wanted us to write functions, should not use vector at this time. Anyways, thanks much for the help!
    See more | Go to post

    Leave a comment:


  • wazzup
    started a topic Help me with pointer to pointers
    in C

    Help me with pointer to pointers

    I'm working on dynamic arrays. I found source code in C. Please help me convert this line of code from C to C++. Thanks so much for the help.

    row and col are variables

    Code:
    arr=(int**)malloc(sizeof(int)*row*col);
    See more | Go to post

  • wazzup
    replied to Help with Simple Integer Expression
    in C
    I got it! Computer does the * and / first (left to right) then do the + and - (left to right). Thanks for the help!
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to Help with Simple Integer Expression
    in C
    This is my output of the program:

    Code:
    Original Input is 12 + 34 - 34 + 11 * 4 * 11 / 1
    Input after trimmed is 12+34-34+11*4*11/11
    Number elements of Array is 13
    Original Values of Elements of the Array
    A[0] = 12
    A[1] = +
    A[2] = 34
    A[3] = -
    A[4] = 34
    A[5] = +
    A[6] = 11
    A[7] = *
    A[8] = 4
    A[9] = *
    A[10] = 11
    A[11] = /
    A[12]
    ...
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to Help with Simple Integer Expression
    in C
    Ok, First, This is my input as a string 12+34-34+11*4*11/11
    Then, convert them to integer and calc them.

    My program gave me result is -32
    But Correct must be 56

    My algorithm is get the string input then create an Array and put them into the Array. For ex input above: 12 is the first element and + is second elements of the array ...etc

    Then I check the the Array if there is * then get the...
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to what is < > & " "
    in C
    If you want to know what stdio.h does, read the Reference here
    http://www.cplusplus.c om/reference/clibrary/cstdio/
    See more | Go to post

    Leave a comment:


  • wazzup
    replied to what is < > & " "
    in C
    I'm newbie with C++ too, correct my if I'm wrong

    #include<stdio. h> <== Include file stdio.h in the library of C Header File
    #include" filename.c" <== Include file filename.c with a specific path of that file
    See more | Go to post

    Leave a comment:


  • wazzup
    started a topic Help with Simple Integer Expression
    in C

    Help with Simple Integer Expression

    My task is Create a program to read a simple integer expression and display the result. "Simple" means no parentheses are allowed and only the +, -, *, and / operators are allowed.

    I think expression would be Multiplications , then Division, then Addition and Subtraction.

    My program gave me a wrong result after addition, take a look to my code you will understand. Please help me to develop this.
    ...
    See more | Go to post

  • wazzup
    started a topic Help me with awk command in Unix please

    Help me with awk command in Unix please

    This is my file named students

    Code:
    Tom     Jones   100     90      80
    Nancy   Jones    70     80      90
    Terry   Sims     55     65      75
    John    Terry    75     76      77
    Ruth    Maier    100    100     100
    Mike    Wolfe    90     95      98
    Dennis  Cole     70     80      89
    Ron     Maier    90     85      89
    Susan   Miller   65     80      90
    Mad     Bill     75     65
    ...
    See more | Go to post

  • determine which letter appears most frequently in the text

    I'm looking for info talk about this but can't find it on google. Anyone help me with this please! Do I need to use array for this?
    See more | Go to post

  • wazzup
    replied to Please help me develop draw nested squares C++
    in C
    Finally, I got it. This problem took me more than 5 hours. Hahha. Such a dummy! Thanks for all the helps!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...