User Profile

Collapse

Profile Sidebar

Collapse
changwl8888
changwl8888
Last Activity: May 19 '10, 03:16 AM
Joined: Mar 17 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • changwl8888
    started a topic Bushfire spread simulation
    in C

    Bushfire spread simulation

    Anyone have idea on this...Please help and explain to me...



    In this option you need to model a forest as a square point lattice in which each lattice point
    represents either a tree or a treeless location. This can be done by using a two-dimensional
    array in which each dimension has the same size. A tree occupies a given lattice point with
    probability P. The ignition of all trees in the first row...
    See more | Go to post

  • changwl8888
    started a topic Sort alphabetic into lower n in ascending order
    in C

    Sort alphabetic into lower n in ascending order

    Sort line
    -----------------
    Enter a string (1-40 characters): CBA123fde[]aa
    Output: aaabcdef


    Above is the output i need..but i have done some code...and i dun have idea how to make it...could anyone help show me some easy example...

    below is my code...i dont think is correct..please correct me

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

    #define...
    See more | Go to post

  • Updating price information and displaying previous price for restaurant menu

    I have a program with restaurant menu and 3 food items..
    in the program i can choose the food and update the price for multiple times..
    And at the same time, i have sales report reporting price of each units and total..

    But the program allow to update price at any time, i need the program to show previous price and show recent price...How is it? What functions should i use?

    the sales report should look like this.....
    See more | Go to post

  • #include "assign1.h"

    /* This source file contains important functions to be developed and
    * used by various menu options, as indicated. Note that every
    * function has as its first parameter the optionsStats array, which
    * will be appropriately updated for later reporting of menu option 6.
    * You may ignore this parameter and its relevance to each function
    * until you develop the sessionSummary( )...
    See more | Go to post

    Leave a comment:


  • it is error on this line
    for (phoneNumber[x];phoneNumber[x].length;phoneNu mber++)

    request for member "length" in something not a structure or union...

    when compile error....
    help please
    See more | Go to post

    Leave a comment:


  • it is error on this line
    for (phoneNumber[x];phoneNumber[x].length;phoneNu mber++)

    request for member "length" in something not a structure or union...


    help please
    See more | Go to post

    Leave a comment:


  • is it correct way to print?
    please correct me if i m wrong...thanks. ..

    Code:
    #define SIZE 30
    
    void translateNumber(int * optionStats, char * phoneNumber)
    {
        phoneNumber[SIZE];
        int x=0;
        int length;
    
    printf("Translating alphatic number:\n");
    printf("Enter Phone Number:\n");
       while (fgets(phoneNumber, SIZE, stdin) != NULL)  /* fetch up to
    ...
    See more | Go to post

    Leave a comment:


  • Code:
    #define SIZE 30
    
    
    void translateNumber(int * optionStats, char * phoneNumber)
    {
        char phoneNumber[SIZE];
        int x=0;
        int length;
    
    printf("Translating alphatic number:\n");
    printf("Enter Phone Number:\n");
       while (fgets(phoneNumber, SIZE, stdin) != NULL)  /* fetch up to 30 chars */
       {
             switch (toupper(phoneNumber[x]))
    ...
    See more | Go to post

    Leave a comment:


  • can u show me some example code?in more details pls..
    See more | Go to post

    Leave a comment:


  • hi..sorry i don't really understand how to convert and store and show all number back...can u please show more details of code...i am really new to c programming
    See more | Go to post

    Leave a comment:


  • changwl8888
    started a topic Converting alphabetic phone number to numeric
    in C

    Converting alphabetic phone number to numeric

    How do i convert an alphabetic phone number to a numeric phone number?

    Translating alphabetic number:

    Enter phone number:1-800-COL-LECT

    1-800-265-5328
    See more | Go to post
No activity results to display
Show More
Working...