ÄÚµå ºí·°¿¡¼´Â ¾Æ¹« ÀÌ»ó ¾øÀÌ ÄÄÆÄÀÏ µÇ¾î ½ÇÇà¿¡ Á¤´ä±îÁö ¸Â´Âµ¥·±Å¸ÀÓ ¿¡·¯¶ó°í ¶ß´Âµ¥ ¼Ò½ºÀÇ ¾î´À ºÎºÐÀÌ ¹®Á¦°¡ ÀÖ´ÂÁö Àß ¸ð¸£°Ú³×¿ä..¤Ð.¤Ð
¼Ò½º´Â ´ÙÀ½°ú °°½À´Ï´Ù.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int k,n,m; //k °úÀÚ °¡°Ý,n »ì °úÀÚ °¹¼ö,m ÇöÀç °¡Áö°í ÀÖ´Â µ·
int totMoney; //totMoney ÃÑ °úÀÚÀÇ ±Ý¾×
int diffMoney; //Â÷¾×
FILE *in,*out;
in = fopen("input.txt","r");
out = fopen("output.txt","w");
fscanf(in,"%d %d %d",&k,&n,&m);
if((k > 0) &&(n <= 1000))
{
if((m>0) &&(m<=100000))
{
totMoney = k * n;
diffMoney = totMoney - m;
fprintf(out,"%d",diffMoney);
}
}
fclose(in);
fclose(out);
return 0;
}
¹®Á¦Á¡À» ¾Ë·Á ÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù.^^