1.启动软件,双击快捷!
2、创建项目!点击文件》》新建项目(或者Cttl+shift+N)
3.选择项目类型!
在右边已安装的模块中选择visual C++ 》》》然后选择win32控制台应用程序,在下方输入项目名称,选择文件路径,》》确定!!
4.点击下一步,注意不要点击完成!!!
5.很重要,在附加选项中勾选空项目,然后点击确定!不勾选,建立的文件有许多没用的代码要删除!!!
6.执行第五步出现以下界面!
7.右键单击源文件》添加》新建项(或者Ctrl+shift+A)
8.中间选择c++文件(cpp),在下方名称栏输入c语言文件名!!!然后选择添加!!注意::例如:文件名.C 没有.C ,默认为.cpp
是c++文件!
写在哪里我就不解释了!!!
例如:上面源代码中第五行中缺少分号,第六行就有红色波浪线提示错误,只有程序中没有红色波浪线才能试调通过!!!!
10.代码没有错误,按住crtl+F5就可以试调程序!!!如图会跳出如下窗口!!
Fortran
点击展开intel(R)visual fortran》》》选择console application》》中间选择empty project 其余同上
2.选择source file,右键单击,后同上
选择fortran 90(.f90)然后添加
输入程序代码
Next
试调(按住ctrl+F5)同上面
Fortran程序代码
program main
implicit none
integer i,j
integer ,dimension(3,4)::tab
do i=1,3
do j=1,4
read*,tab(i,j)
end do
end do
do i=1,3
do j=1,4
print*,tab(i,j)
end do
end do
end
program main
implicit none
integer i,j
integer ,dimension(3,4)::tab
read*,((tab(i,j),i=1,3),j=1,4)
print*,((tab(i,j),i=1,3),j=1,4) end
program example2
implicit none
real a,b,c,d,e,f,g,x1,x2
print *,'方程axx+bx+c=0'
print *,'输入a:'
read *,a
print *,'输入b:'
read *,b
print *,'输入c:'
read *,c
d=b*b-4.0*a*c
if (d>=0.0)then
e=sqrt(d)
x1=(-b+e)/(2.0*a)
x2=(-b-e)/(2.0*a)
print *,'x1=',x1
print *,'x2=',x2
else
f=-b/(2.0*a)
g=sqrt(-d)/(2.0*a)
print *,'x1=',f,'+i',g
print *,'x2=',f,'-i',g
end if
end
别跟我说不会了!!
我只能帮到这了!!!