User Profile

Collapse

Profile Sidebar

Collapse
asc173
asc173
Last Activity: Oct 2 '07, 01:52 AM
Joined: Sep 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • asc173
    replied to Converting pseudocode to C++
    in C
    i'm just trying to figure out the spot where to put the loops
    here's what i got so far:


    cout <<"Please input number to be factored:" <<
    cin >> number >> endl;
    while (number>1){

    res = number;
    factor = 2;
    rem = (res/factor)
    while (factor <= res){
    while ((res/factor), rem ==0){
    cout << factor &...
    See more | Go to post

    Leave a comment:


  • asc173
    started a topic Converting pseudocode to C++
    in C

    Converting pseudocode to C++

    can anyone tell me how to write this in normal c++? thanks!

    input a value to factor
    while input value > 1

    let residual = input value
    let factor = 2
    while factor <= residual
    while factor divides residual
    (i.e. remainder = 0)
    output factor
    divide residual by factor
    increment factor

    input...
    See more | Go to post
No activity results to display
Show More
Working...