RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-229512

Unknown's questions

Martin Hope
Unknown
Asked: 2020-02-17 01:21:59 +0000 UTC

这些名称中的 0.2717D+05 - "D" 是什么?

  • 1

此表格中有提交的数字信息

-0.2717D+05  -0.2277D+04   0.2202D+05   0.1657D+03  -0.7041D+01   0.1479D+03 

例如,对于上下文,这里使用this 。

问题。这些名称中有什么 - “D”?在某种程度上是10吗?或不?

我知道这是一个非常愚蠢的问题,但我以前从未使用过以这种方式呈现的数字数据,所以请不要穿上你的拖鞋 :)

числа
  • 1 个回答
  • 10 Views
Martin Hope
Unknown
Asked: 2020-01-18 19:45:19 +0000 UTC

执行命令后元素 n[1] 将取什么值:

  • 12
int i = 0, n[] = {7, 5, 3, 1};
for ( ; i<3; n[i++] = n[i]);

事实上,两个不同的编译器(Code Blocks和CppDroid)产生两个不同的值。事实证明5,在 Code Blocks 中,在 CppDroid -3中。那么正确答案是什么?其中一个编译器有问题,还是任务本身不正确?

c++
  • 5 个回答
  • 10 Views
Martin Hope
Unknown
Asked: 2020-12-14 03:20:08 +0000 UTC

一个计算文件中空格、句点、逗号数量的程序

  • 0

晚上好!您需要编写一个程序来计算文件中空格、句点和逗号的数量。我试图通过创建一个char类型的数组来做到这一点,但老师没有批准))我不完全清楚如何在不创建数组的情况下完成这项任务,而是使用ifstream/ofstream和相关函数。有没有可能通过做一些小的改动来保存我的程序,让它正常工作?))然后我真的不想再重写所有的东西了..((提前致谢!

#include <iostream>
#include <string.h>
#include <cstdlib>
#include <stdio.h>
using namespace std;

int main ()
{
char a[1000];
cout << "Enter your text: " << endl;
gets (a);
int spc = 0, dt = 0, km = 0;
int lng = strlen(a);

for (int d = 0; d < lng; d++)
{
    if (a[d] == ',') km++;
}

for (int c = 0; c < lng; c++)
{
    if (a[c] == '.') dt++;
}

for (int b = 0; b < lng; b++)
{
    if (a[b] == ' ') spc++;
}

if (spc >= 1)
{
cout << "The number of spaces in the text is: " << endl << spc << endl;
}
else
{
cout << "There are no spaces in the text" << endl;
}

if (dt >= 1)
{
cout << "The number of dots in the text is: " << endl << dt << endl;
}
else
{
cout << "There are no dots in the text" << endl;
}

if (km >= 1)
{
cout << "The number of commas in the text is: " << endl << km << endl;
}
else
{
cout << "There are no commas in the text" << endl;
}
}
c++
  • 5 个回答
  • 10 Views
Martin Hope
Unknown
Asked: 2020-11-30 03:14:58 +0000 UTC

给定一个 n 阶方阵 A。需要构造一个矩阵 B 使得它的每一个元素

  • 1

等于矩阵 A 中最大的元素,它们与所需元素位于同一行和同一列。我写了一个程序,寻找矩阵A的列和行中的最大元素。现在,理论上,您需要再次找到那两列中的最大元素,但是如何做到这一点?以及如何用这些元素填充矩阵 B?我在朝那个方向思考吗?

int main()
{
    int n;
    cout << "Order of matrix A is " << endl;
    cin >> n;
    cout << endl;
    int** A = new int* [n];

    for (int i = 0; i < n; i++)
        A[i] = new int[n];

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            A[i][j] = rand() % 100;
            cout << setw(3) << A[i][j] << " ";
        }

        cout << endl;
    }

    cout << endl;
    int max;
    int** B = new int* [n];
    max = A[0][0];

    for (int c = 0; c < n; c++)
    {
        for (int a = 0; a < n; a++)
        {
            if (max < A[c][a]) max = A[c][a];
        }

        cout << max << endl;
        max = 0;
    }

    cout << endl;

    for (int a = 0; a < n; a++)
    {
        for (int c = 0; c < n; c++)
        {
            if (max < A[c][a]) max = A[c][a];
        }

        cout << max << endl;
        max = 0;
    }

    return 0;
}
c++
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5