csci3251-2023 / project-team-e

project-team-e created by GitHub Classroom
2 stars 0 forks source link

Task 4: Write C code #5

Open Munkhbilegb opened 1 year ago

Munkhbilegb commented 1 year ago

Please start to remember what you have done for your C beginning classes. Or learn it anew!

As the Development Manager, your tasks include:

  1. In code.c, write a piece of very simple (yet correct) C code (e.g. Hello World, simple for loop, simple if...then...else, etc.)
  2. Set up a GitHub Action with a workflow (e.g., C/C++ with Make) to run the C code, referencing here: https://docs.github.com/en/actions/using-workflows/using-starter-workflows
  3. Since you didn't prepare anything for configure or make, you should keep only one pair of name and run. The name doesn't matter, and only use this line for run::
  1. This action will deploy your code every time there is a push (merge action) into the main branch
  1. You can check out the progress under the Actions tab
wttlab1910 commented 1 year ago

include

int main(void) { int x,factorial =1; // define integer x scanf("%d", &x); // obtain integer x from user while(x >= 1){ factorial = factorial * x; x--;

} printf("%d", factorial);

// print factorial

}

Munkhbilegb commented 1 year ago

Add the C code to the code section