Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
111100001 committed Oct 18, 2022
0 parents commit 058aa5b
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"configurations": [
{
"name": "C/C++: gcc build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
],
"version": "2.0.0"
}
48 changes: 48 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc-11 build active file",
"command": "/usr/bin/gcc-11",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
},
{
"type": "cppbuild",
"label": "C/C++: gcc build active file",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Binary file added a.out
Binary file not shown.
Binary file added homework
Binary file not shown.
26 changes: 26 additions & 0 deletions homework.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <stdio.h>
int main(void)
{
float bmi =0;
float cm;
float kg;
bmi = (10000 * kg)/(kg * cm);
printf("%s", "enter height:");
scanf("%f", &cm);
printf("%s","enter weight:");
scanf("%f",&kg);
if (bmi < 18.5 ){
puts("you're underweight");
}
else if(18.5<=bmi<=24.9 ){
puts("your weight is normal");
}
else if (25<=bmi<=29.9){
puts("you're overweight");
}
else if (bmi >=30 ){
puts("you're obese");
}

printf("bmi is %.2f\n", bmi);
}

0 comments on commit 058aa5b

Please sign in to comment.