소인수프로그램 오류
모람
질문 제목 :소인수프로그램오류 질문 요약 :이거 수정해주세요질문 내용 :
제 취미인 프로그래밍을 해서 에러 안뜨길래 작동시켰더니
/*******************************************************************************************/
#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)로 바꿔주세요
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2655491 | 키보드 인식, 랜덤 함수 or 헤더 (2) | 별 | 2024-05-20 |
2655471 | 링 버퍼 구현된 소스 인데요.. 이해가 잘안되서요.. | 소심한녀자 | 2024-05-20 |
2655440 | test파일이 안 되요. (2) | 리라 | 2024-05-19 |
2655416 | 고수님들 도움이 절실합니다. (2) | 세리 | 2024-05-19 |
2655361 | 엔터 입력받을때까지 기다리는 getchar (1) | 큰모음 | 2024-05-19 |
2655328 | 함수에서 포인터 (3) | 모아 | 2024-05-18 |
2655299 | 아이콘바꾸는법..? | 소 | 2024-05-18 |
2655271 | scanf 입력받으면 쭉 실행되는.. (5) | ComeOn | 2024-05-18 |
2655184 | 이 세개 프로그램좀 해결해주실.... 고수님들???? (3) | 말달리자 | 2024-05-17 |
2655129 | 다차원 배열 원소들 주소계산하는거 질문이요~ | 터전 | 2024-05-17 |
2655103 | AVRstudio MoveAxis. MoveLine 함수질문 | 앨버트 | 2024-05-16 |
2655072 | 콘솔창의 위치와 크기를 정하고 싶습니다. | 딥레드 | 2024-05-16 |
2655044 | 자료구조랑 online judge site에 대해서 질문있습니다... (1) | 뽀송뽀송 | 2024-05-16 |
2655016 | 별찍기 문제 중 이해안되는 부분이 있어요... | 도전중 | 2024-05-16 |
2654986 | 입력받은 성적을 배열에 저장하기 (3) | 안녕나야 | 2024-05-15 |
2654959 | ===========-이런거 미리 지정하는법 (1) | 김자영 | 2024-05-15 |
2654930 | 도와주십시요 ㅜㅜ 자료구조 ㅜㅜ | 도널드 | 2024-05-15 |
2654881 | PID 모듈 검색 부분 질문합니다 . | 이름없음 | 2024-05-14 |
2654850 | 조건에 만족하는 다음 수를 찾고 싶습니다. | 초엘 | 2024-05-14 |
2654790 | 두파일간 byte단위 txt파일 복사 中 | 슬찬 | 2024-05-14 |