请选择 进入手机版 | 继续访问电脑版
楼主: Nicolle
2289 10

[Matlab-Based Book]Programming for Chemical Engineers Using C, C++, and MATLAB [推广有奖]

巨擘

0%

还不是VIP/贵宾

-

TA的文库  其他...

Python(Must-Read Books)

SAS Programming

Must-Read Books

威望
16
论坛币
12402323 个
通用积分
1620.8615
学术水平
3305 点
热心指数
3329 点
信用等级
3095 点
经验
477211 点
帖子
23879
精华
91
在线时间
9878 小时
注册时间
2005-4-23
最后登录
2022-3-6

Nicolle 学生认证  发表于 2015-10-12 11:39:52 |显示全部楼层 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

本帖被以下文库推荐

Nicolle 学生认证  发表于 2015-10-12 11:41:31 |显示全部楼层 |坛友微信交流群

Cramer’s Rule Program

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2015-10-12 11:44:42 |显示全部楼层 |坛友微信交流群

Gausss-Jordan Program

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2015-10-12 11:48:58 |显示全部楼层 |坛友微信交流群

Gauss-Seidel Program

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2015-10-12 11:55:59 |显示全部楼层 |坛友微信交流群

Linear Regression Program

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2015-10-12 12:00:29 |显示全部楼层 |坛友微信交流群

Polynomial Regression Program

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2015-12-20 06:16:20 |显示全部楼层 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

Nicolle 学生认证  发表于 2016-2-7 05:23:56 |显示全部楼层 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

  1. /*
  2. *  =====================================================================
  3. *  Test Pre- and Postincrement Operations
  4. *                                                                     
  5. *  Copyright (C) 1998 by Mark Austin and David Chancogne.
  6. *                                                                     
  7. *  This software is provided "as is" without express or implied warranty.
  8. *  Permission is granted to use this software on any computer system,
  9. *  and to redistribute it freely, subject to the following restrictions:
  10. *
  11. *  1. The authors are not responsible for the consequences of use of
  12. *     this software, even if they arise from defects in the software.
  13. *  2. The origin of this software must not be misrepresented, either
  14. *     by explicit claim or by omission.
  15. *  3. Altered versions must be plainly marked as such, and must not
  16. *     be misrepresented as being the original software.
  17. *  4. This notice is to remain intact.
  18. *
  19. *  Written by : Mark Austin
  20. *  =====================================================================
  21. */

  22. int main( void ) {
  23. int iCount1, iCount2;

  24.    /* [a] : Test Postincrement Operators */

  25.    iCount1 = 5;
  26.    printf( "The value of   iCount1 is : %4d\n", iCount1 );
  27.    printf( "The value of iCount1++ is : %4d\n", iCount1++ );
  28.    printf( "The value of iCount1-- is : %4d\n\n", iCount1-- );

  29.    /* [b] : Test Preincrement Operators */

  30.    iCount1 = 5;
  31.    printf( "The value of   iCount1 is : %4d\n", iCount1 );
  32.    printf( "The value of ++iCount1 is : %4d\n", ++iCount1 );
  33.    printf( "The value of --iCount1 is : %4d\n\n", --iCount1 );

  34.    /* [c] : Test Pre- and Postincrement Operators */

  35.    iCount2 = iCount1++;
  36.    printf( "The value of \"iCount2 = iCount1++\" is : %4d\n", iCount2 );
  37.    iCount2 = ++iCount1;
  38.    printf( "The value of \"iCount2 = ++iCount1\" is : %4d\n", iCount2 );
  39. }
复制代码

使用道具

  1. /*
  2. *  ======================================================================
  3. *  Combined Resistance of Three Resistors in Parallel
  4. *
  5. *  Copyright (C) 1998 by Mark Austin and David Chancogne.
  6. *                                                                     
  7. *  This software is provided "as is" without express or implied warranty.
  8. *  Permission is granted to use this software on any computer system,
  9. *  and to redistribute it freely, subject to the following restrictions:
  10. *
  11. *  1. The authors are not responsible for the consequences of use of
  12. *     this software, even if they arise from defects in the software.
  13. *  2. The origin of this software must not be misrepresented, either
  14. *     by explicit claim or by omission.
  15. *  3. Altered versions must be plainly marked as such, and must not
  16. *     be misrepresented as being the original software.
  17. *  4. This notice is to remain intact.
  18. *
  19. *  Written by : Mark Austin
  20. *  ======================================================================
  21. */

  22. #include <stdio.h>

  23. int main( void ) {
  24.   float fR1 = 1.5F;
  25.   float fR2 = 2.5F;
  26.   float fR3 = 3.5F;
  27.   float fCombinedResistance;

  28.   /* [a] : Print properties of individual resistors */

  29.      printf( "Resistor 1 is %8.3f ohms\n", fR1 );
  30.      printf( "Resistor 2 is %8.3f ohms\n", fR2 );
  31.      printf( "Resistor 3 is %8.3f ohms\n", fR3 );

  32.   /* [b] : Compute and print combined resistance */

  33.      fCombinedResistance = 1.0 / ( 1.0/fR1 + 1.0/fR2 + 1.0/fR3 );
  34.      printf( "Combined Resistance is %8.3f ohms\n", fCombinedResistance);
  35. }
复制代码

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-19 07:17