summaryrefslogtreecommitdiffstats
path: root/test cases/fortran/9 cpp/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/fortran/9 cpp/main.c8
-rw-r--r--test cases/fortran/9 cpp/main.cpp8
2 files changed, 16 insertions, 0 deletions
diff --git a/test cases/fortran/9 cpp/main.c b/test cases/fortran/9 cpp/main.c
new file mode 100644
index 0000000..c1750ad
--- /dev/null
+++ b/test cases/fortran/9 cpp/main.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+double fortran(void);
+
+int main(void) {
+ printf("FORTRAN gave us this number: %lf.\n", fortran());
+ return 0;
+}
diff --git a/test cases/fortran/9 cpp/main.cpp b/test cases/fortran/9 cpp/main.cpp
new file mode 100644
index 0000000..534a23a
--- /dev/null
+++ b/test cases/fortran/9 cpp/main.cpp
@@ -0,0 +1,8 @@
+#include <iostream>
+
+extern "C" double fortran();
+
+int main(void) {
+ std::cout << "FORTRAN gave us this number: " << fortran() << '\n';
+ return 0;
+}