zoukankan      html  css  js  c++  java
  • fortran 77 example

    c00000000111111111122222222223333333333444444444455555555556666666666777
    c23456789012345678901234567890123456789012345678901234567890123456789012
              program function1
    c --- declaration of variables
              real x, y
    c --- show function
             print*,"=========================================="
             print*,"Calculate the function y = f(x) defined as"
             print*,"           y = x+1 if x < 1"
             print*,"           y = 2-x if x >= 1"
             print*,"=========================================="
    c --- request x as input
             print*,"enter a value of x:"
             read*,x
    c --- evaluation of function
            if (x.lt.1.0) then
               y = x+1
            else
              y = 2-x
            end if
    c --- print result
            print*,"the corresponding value of y is: ",y
    c --- end program
            end
  • 相关阅读:
    C# CefSharp
    C# CRC16 modbus
    C++ 调试信息输出
    运行elasticsearch.bat出错
    Windows下NodeJS安装与npm环境变量配置
    Rescue
    Catch That Cow
    7.3.1 Swagger 文档生成工具
    3.并发处理
    2.集合处理
  • 原文地址:https://www.cnblogs.com/greencolor/p/2101677.html
Copyright © 2011-2022 走看看