0

帮助解决问题:我需要编写 C++ 程序,该程序使用运算符printf和. 输入和显示数字变量scanf。这些值为:

E = 10 ^ 3
 F = -450
 H = 0,005 * 10 ^ 2
 X = -43,562 * 10 ^ (-3)
 I = 75600
 Y = -0,00036

但我不明白我必须如何输入10 ^ 3和其他......目前我的代码是......

#include <stdio.h>
#include <conio.h>
main()
{
    int E;
    int F;
    puts("Введите значения E и F");
    scanf("%d,%d", &E,&F);
    printf("Значение E=%2d\n",E);
    printf("Значение F=%4d\n",F);
    puts("-----------------------------");
    float H;
    float X;
    int I;
    float y;
    puts("Введите значение  I");
    puts("Введите значение H, X, Y");



    getch();
    return 0;
}
4

1 回答 1

0

If I understood your question correctly, the answer is: use scientific notation

10 ^ 3 becomes 1e3, 0.005 * 10 ^ 2 becomes 0.005e-2 and so on

于 2012-09-26T19:14:13.837 回答