From 9704a948795ce25293bff8aa361a813c182af6ab Mon Sep 17 00:00:00 2001 From: Saturneric Date: Tue, 1 Sep 2020 00:09:02 +0800 Subject: [PATCH] Create main.cpp --- main.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..7ad1d6b --- /dev/null +++ b/main.cpp @@ -0,0 +1,23 @@ +// +// main.cpp +// My first cpp program +// +// Created by Eric on 16-2-11. +// Copyright (c) 2016年 Bakantu Eric. All rights reserved. +// + +#include +#include +using namespace std; + +ifstream fin ("data.in"); +ofstream fout ("data.out"); + +int main(int argc, const char * argv[]) { + // insert code here... + int a,b; + fin >> a; + b = a+1; + fout << b << endl; + return 0; +}