0
0

More than 3 years have passed since last update.

pythonとかをbatファイルから実行してみた

Last updated at Posted at 2020-11-16

batファイルでCとかpythonとかを実行する

この頃寒いですね。

なんでそんな面倒なことを

え?なんで?そりゃぁ、ねぇ、、、夢ってやつ?
あ、多分詳しいやり方とかはご自分でググったほうがわかりやすいかと。
あくまでも自己満なので。

やってみた

まずbatファイルから。
c言語の実行↓(オプションなどは随時書き換えるしかないです。とゆうか誰も使わないか)

@echo off
gcc %1
a

pythonの実行↓

@echo off
python %1

今回実行してみたコード(C言語&python)

//test.c
#include <stdio.h>

int main(){
    printf("OK!! this is c");
    return 0;
} 
#test.py
print("OK! this is python")

結果

できた!やったぜ。

OK!! this is c
OK! this is python
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0