User Profile

Collapse

Profile Sidebar

Collapse
majestic
majestic
Last Activity: Mar 27 '08, 11:10 AM
Joined: Feb 28 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • majestic
    replied to Help required for C program
    in C
    Hi, This is the code that i've written so far, I'm having some problems configuring the for loops..... can anyone help?? here is the code

    [CODE=c]#include <stdio.h>

    int main(){
    int number[501];
    int i,bulb,incr,j;
    bulb=1;


    bulb++;
    incr=bulb;
    for(i=bulb;i<=5 01;i+incr)
    {
    ...
    See more | Go to post
    Last edited by Ganon11; Mar 14 '08, 11:57 AM. Reason: Please use the [CODE] tags provided.

    Leave a comment:


  • majestic
    replied to Input numbers output words problem
    in C
    hey,thank you. i have to input the number rather than the text but i got the idea.i'll work wit it..thank you...
    See more | Go to post

    Leave a comment:


  • majestic
    replied to Input numbers output words problem
    in C
    yes,i know tht.but i tried using the array with one number in it..it still didnt work.i need to assign values(ones,ten s,hundredths) .i need to tell the computer tht in the case of 768,7 is a hundred,6 is a ten,and 8 is a one....can anyone plz tell how i can do tht.i've been reading and i cant find a way to do it.thank you very much
    See more | Go to post

    Leave a comment:


  • majestic
    replied to Input numbers output words problem
    in C
    yes,i know tht.but i tried using the array with one number in it..it still didnt work.i need to assign values(ones,ten s,hundredths) .i need to tell the computer tht in the case of 768,7 is a hundred,6 is a ten,and 8 is a one....can anyone plz tell how i can do tht.i've been reading and i cant find a way to do it.
    See more | Go to post

    Leave a comment:


  • majestic
    replied to Input numbers output words problem
    in C
    i think the array should only have one number(i have 3 in the array above),its supposed to just be a 3 digit number..one number.can anyone help me with tht..thnx
    See more | Go to post

    Leave a comment:


  • majestic
    started a topic Input numbers output words problem
    in C

    Input numbers output words problem

    Hello,i'm wondering if anyone can help me. The c program needs to input any number from 1-999 and it must output whatever number was input in words.i have made a start on the hundredths and tens...can anyone help me with wht i can use to input the data? When i compile and run the program,only if i put in a single digit then it prints (eg if i put in 5) five hundred, for 3 digit numbers it doesnt print anything.I think the problem is inputing the...
    See more | Go to post
    Last edited by sicarie; Mar 8 '08, 05:20 AM. Reason: Posting Guidelines 'whole code responses'

  • majestic
    started a topic Help required for C program
    in C

    Help required for C program

    Hello, Is it possible that someone can help me with the following program?

    There are 500 light bulbs (numbered 1 to 500) arranged in a row. Initially they are all OFF. Starting with bulb 2, all even numbered bulbs are turned ON. Next, starting with bulb 3, and visiting every third bulb, it is turned ON if it is OFF, and it is turned OFF if it is ON. This procedure is repeated for every fourth bulb, then every fifth bulb, and so on...
    See more | Go to post
No activity results to display
Show More
Working...