원자 백과사전(?)을 만들다 도중에 오류가 생깁니다 도와주세요
밝은빛누리예
질문 제목 : 위에 고대로처리되지 않은 오류라면서 오류가 뜨네요... 어쩌죠?질문 내용 :
소스
------------------------------------------------------------------------
#include stdio.h
#include conio.h
#include windows.h
#include stdlib.h
void cursor(char s)
{
handle hconsole;
console_cursor_info consolecursor;
hconsole = getstdhandle(std_output_handle);
consolecursor.bvisible = s;
consolecursor.dwsize = 1;
setconsolecursorinfo(hconsole , &consolecursor);
}
int main(void)
{
int choice,atom_choice;
cursor(0);
system(title 원자 백과사전);
system(color 2f);
puts(원자 백과사전 오신것을 환영합니다!\n);
system(pause);
system(cls);
puts(1.원자 검색);
puts(2.제작자 블로그 가보기\n);
puts(원하는 메뉴를 선택하십시요....\n);
scanf(%d,&choice);
if(choice==1)
{
printf(원자 백과사전 입니다.\n);
printf(총 1부터 118까지의 원자번호가 있으며 찾고싶은 원자 번호를 입력해주세요.\n);
scanf(%d,atom_choice);
if(atom_choice==1)
{
printf(입력하신 원자번호 %d에 해당하는 원자는 수소 입니다!\n,atom_choice);
printf(수소의 대한 정보를 가져오는 중입니다.....\n);
sleep(1000);
printf(족:1족\n);
printf(주기:1주기\n);
printf(구역:s-구역\n);
printf(화학계열:비금속\n);
printf(겉보기:무색\n);
printf(원자질량:1g/mol\n);
printf(전자배열:1s1\n);
printf(준위별 전자 수:1\n);
printf(상태:기체\n);
printf(밀도:(0 °c, 101.325 kpa)0.08988 g/l\n);
printf(녹는점:14.01 k\n);
printf(끓는점:20.28 k\n);
printf(삼중점:13.8033 k, 7.042 kpa\n);
printf(융해열:(h2)0.117 kj/mol\n);
printf(기화열:(h2)0.904 kj/mol\n);
printf(열용량:(25°c) 28.836 j/(mol·k)\n);
}
}
}
-------------------------------------------------------------------------
뭐 아직 초기단계라 원자 검색 매뉴중 수소밖에 만들지 못했습니다 ㅠㅠ
근데, 원자 검색 매뉴를 선택하기 위해 1번을 눌러서
if(choice==1)에 들어가기만 하면
이거 어쩌면 좋죠...? ㅠㅠ
-
찬슬
알고보니 변수 뒤에 &을 빼먹었지 뭡니까 ㅋㅋ
-
큰아
이런근본적인건
워닝으로라도 컴파일러가 잡아주지않나요?
scanf(\%d\ -
알버트
네 맞는데여 ㅠㅠ
-
그대와나
ㅋㅋ 로딩하는 척 하느라 sleep을 쓰다니요 ㅋ.
콘솔프로젝트 c로 한거 맞아요? 왜 예외가 나오지.