C++での小数点以下を持って答えを計算する助けが必要は、しかし、私はこの時点で何をすべきかわからない、正しい答えを得るか助けてください、私は最終的な答えの小数点を持つように、このコードを取得カント
#include<stdio.h>
int main(){
int n1,n2,n3,n4,n5;
printf("Please enter the cost of the car then your down payment\n");
scanf("%d%d",&n1,&n2);
n3=n1-n2;
printf("Now enter how many months of financing you would like\n");
scanf("%d",&n4);
n5=n3*1.05/n4;
printf("Your car payment is %d per month",n5);
return 0;
}
'int'の値と'%d'が出力する値を調べます。さらに、 'int n1、n2、n3、n4、n5; 'ということは、いくつかのレベルで悪いです。 – LogicStuff