-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 058aa5b
Showing
5 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |