소인수프로그램 오류
모람
질문 제목 :소인수프로그램오류 질문 요약 :이거 수정해주세요질문 내용 :
제 취미인 프로그래밍을 해서 에러 안뜨길래 작동시켰더니
/*******************************************************************************************/
#include stdio.h
int sosu [3000], bunhaesu, buf, buf2, bucount, bufcounter, sosudaip [3000], bunhasave;
main ()
{
while (1)
{
printf(초기화중 \n);
bucount = 0;
while (bucount ==! 3001)
{
sosu [bucount] = 0;
sosudaip [bucount] = 0;
bucount = bucount + 1;
}
printf(소인수 분해 할 수:);
scanf(%d,&bunhaesu);
sosu [0] = 2;
printf(새 소수: 2 \n);
bunhasave = bunhaesu;
bucount = 0;
while (bunhaesu == 1);
{
while (1)
{
sosu [bucount] = buf;
buf2 = bunhaesu / buf;
printf(test1);
bunhaesu = buf2;
sosudaip [bucount] = sosudaip [bucount] + 1;
bucount = bucount + 1;
if ((bunhaesu % sosu [bucount]) ==! 0)
{
break;
}
}
bucount = 0;
buf = 2;
while (1) //sosu [bucount] ==! 0
{
if ( (buf % sosu [bucount]) ==! 0)
{
bucount = bucount + 1;
}
else
{
&nbnbsp; bucount = 0;
buf = buf + 1;
}
if(sosu [bucount] == 0)
{
sosu [bucount] = buf;
printf(test2);
break;
}
}
if (sosu [3000] ==! 0)
{
break;
}
sosu [bucount] = buf;
bucount = 0;
}
while (1)
{
printf(%d의 %d승 \n,sosu [bucount],sosudaip [bucount]);
bucount = bucount + 1;
if(sosudaip [bucount] == 0)
{
break;
}
}
}
}
/**********************************************************************************************/
어떡합니까
-
YourWay 2024-04-24
아참그리고 main()을 int main(void)로 바꿔주세요
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2653957 | 뭐가틀린건가요?.. (2) | 볼1매그녀 | 2024-05-06 |
2653934 | malloc을 이용한 출력 (1) | 하예 | 2024-05-06 |
2653906 | 숫자 야구 게임인데요.. (2) | 상큼한캔디 | 2024-05-06 |
2653883 | 구조체 질문이요.. 연결리스트. (1) | 별 | 2024-05-05 |
2653802 | 배열에 저장된 데이터와 원하는 데이터비교하는것좀.. | 리카 | 2024-05-05 |
2653727 | 고수님들 봐주세요~ (2) | 아담 | 2024-05-04 |
2653702 | C언어 의 단계가 어떻게 되나요???????????????? (3) | 길가온 | 2024-05-04 |
2653645 | 저....while인데..이게무슨뜻인지좀.. | 설희 | 2024-05-03 |
2653613 | 성별변수 | 뿡뿡 | 2024-05-03 |
2653584 | 16진수 변환 관련 질문 드립니다. | 매미꽃 | 2024-05-03 |
2653557 | 한글 완성형과 조합형의 전환 | 해지개 | 2024-05-02 |
2653506 | void형 포인터 이해안가요 ㅠㅠ (2) | 뭘봐요 | 2024-05-02 |
2653482 | 패턴매칭에 대한 질문하나 올립니다 | 미투리 | 2024-05-02 |
2653452 | main 함수 매개변수 문의드립니다. (2) | 딥레드 | 2024-05-01 |
2653425 | 간단한 포인터 설명좀 해주세요 ㅠㅠㅠ | 차분나래 | 2024-05-01 |
2653400 | 플로우 차트 작성 질문입니다. (2) | 아인 | 2024-05-01 |
2653370 | c언어 해석 부탁드립니다 ㅠ | 악당 | 2024-05-01 |
2653345 | 분수의 덧셈 질문이요 | 하늘 | 2024-04-30 |
2653313 | //정수 n을 입력받아 1부터 n까지의 합을 구하는 프로그램// (6) | 거북이 | 2024-04-30 |
2653284 | 알파벳 변수 관련(배열에서) | 나슬 | 2024-04-30 |