|
|
谁来帮帮我~C程式!!(急) |
复制代码
- #include <stdio.h>
- int main()
- {
- for (int i = 1; i <= 100; i++)
- i % 10 == 0 ? printf("\n") : printf("*");
- return 0;
- }
复制代码
- C:\Users\Dhilip89\Desktop>cl star.c
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
- Copyright (C) Microsoft Corporation. All rights reserved.
- star.c
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(7) : error C2065: 'i' : undeclared identifier
- C:\Users\Dhilip89\Desktop>cl star.c
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
- Copyright (C) Microsoft Corporation. All rights reserved.
- star.c
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(6) : error C2065: 'i' : undeclared identifier
- star.c(7) : error C2065: 'i' : undeclared identifier
复制代码
- #include <stdio.h>
- int main()
- {
- int i;
- for (i = 1; i <= 100; i++)
- i % 10 == 0 ? printf("\n") : printf("*");
- return 0;
- }
复制代码
- C:\Users\Dhilip89\Desktop>cl star.c
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
- Copyright (C) Microsoft Corporation. All rights reserved.
- star.c
- Microsoft (R) Incremental Linker Version 9.00.30729.01
- Copyright (C) Microsoft Corporation. All rights reserved.
- /out:star.exe
- star.obj
- C:\Users\Dhilip89\Desktop>star
- *********
- *********
- *********
- *********
- *********
- *********
- *********
- *********
- *********
- *********
JBTALKS.CC |联系我们 |隐私政策 |Share
GMT+8, 2026-4-27 11:32 AM , Processed in 0.115461 second(s), 21 queries .
Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
Dedicated Server powered by iCore Technology Sdn. Bhd.