C语言调用Fortran 10
展开全部
好像也可以用system()调用编译好的Fortran吧。
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>
void main()
{
char letter;
do {
printf("A Display directory listing\n");
printf("B Display disk information\n");
printf("C Change system date\n");
printf("Q Quit\n");
printf("Choice: ");
letter = getch();
letter = toupper(letter);
if (letter == 'A')
system("DIR");
else if (letter == 'B')
system("CHKDSK");
else if (letter == 'C')
system("DATE");
}
while (letter != 'Q');
getch();
}
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>
void main()
{
char letter;
do {
printf("A Display directory listing\n");
printf("B Display disk information\n");
printf("C Change system date\n");
printf("Q Quit\n");
printf("Choice: ");
letter = getch();
letter = toupper(letter);
if (letter == 'A')
system("DIR");
else if (letter == 'B')
system("CHKDSK");
else if (letter == 'C')
system("DATE");
}
while (letter != 'Q');
getch();
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询