1 Star 2 Fork 1

Huoty/cppstudy

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
complex.cpp 406 Bytes
Copy Edit Raw Blame History
Huoty authored 2024-12-08 23:34 +08:00 . update at 20241208233432
/*
* Copyright (c) JoinQuant Development Team
* Author: Huayong Kuang <kuanghuayong@joinquant.com>
*/
#include <iostream>
using namespace std;
struct complex {
double x; // 实部
double y; // 虚部
};
int main(void)
{
struct complex z;
double x = 3.0;
z.x = x;
z.y = 4.0;
if (z.y < 0)
printf("z=%f%fi\n", z.x, z.y);
else
printf("z=%f+%fi\n", z.x, z.y);
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/konghy/cppstudy.git
git@gitee.com:konghy/cppstudy.git
konghy
cppstudy
cppstudy
master

Search