C++ 因式分解

朋友要我幫他寫的  乾 快1年沒碰C++  都要忘了
就亂打一通?#
==============================
#include<stdio.h>
#include<stdlib.h>

int main(void){

    int i=0,b,c=1,d;
    printf(“請輸入數字”);
    scanf(“%d”,&i);
    b=i;
    d=i;
    do{
        if(b%c){
            c=c+1;
            }
        else if (b%c == 0){
            printf(“%d”,c);
            printf(“*”);

            if(d==b/c){
                d=b/c;
                b=b/c;
                c=c+1;
                }
            else{
                d=b/c;
                b=b/c;
                c=c;
                }
            }
    }while(c!=d);

    printf(“%d”,d);
    system(“pause”);
    return 0;

}
========================
完畢