Repository: marciolopesjr/conversor-escalaTempC
Branch: main
Commit: df622b630e73
Files: 2
Total size: 1.3 KB
Directory structure:
gitextract_brlwbp6n/
├── README.md
└── conversor.c
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# conversor-escalaTempC
Um conversor de escalas de temperatura na linha de comando.
================================================
FILE: conversor.c
================================================
/* Conversor simples de escalas de temperatura usando somente C.*/
/* Márcio Lopes, 04/06/2021 */
#include <stdio.h>
#include <string.h>
int main()
{
float celsius, fahrenheit, kelvin;
char escala[10];
printf("Deseja converter Celsius(c), Fahrenheit(f) ou Kelvin(k)? Digite a letra da alternativa.\n");
scanf("%s", escala);
if (strcmp (escala, "c") == 0){
printf("Digite a temperatura em Celsius: ");
scanf("%f", &celsius);
fahrenheit = (celsius * 9 / 5) + 32;
kelvin = 273.15 + celsius;
printf("%.2f Celsius = %.2f Fahrenheit\n", celsius, fahrenheit);
printf("%.2f Celsius = %.2f Kelvin", celsius, kelvin);
}
if (strcmp(escala, "f") == 0){
printf("Digite a temperatura em Fahrenheit: ");
scanf("%f", &fahrenheit);
celsius = (fahrenheit -32) / 1.8;
kelvin = 273.5 + ((fahrenheit - 32.0) * (5.0/9.0));
printf("%.2f Fahrenheit = %.2f Celsius.\n", fahrenheit, celsius);
printf("%.2f Fahrenheit = %.2f Kelvin.\n", fahrenheit, kelvin);
}
if (strcmp(escala, "k") == 0){
printf("Digite a temperatura em Kelvin: ");
scanf("%f", &kelvin);
celsius = kelvin - 273.15;
fahrenheit = kelvin * 9/5 - 459.67;
printf("%.2f Kelvin = %.2f Celsius.\n", kelvin, celsius);
printf("%.2f Kelvin = %.2f Fahrenheit.\n", kelvin, fahrenheit);
}
return 0;
}
gitextract_brlwbp6n/ ├── README.md └── conversor.c
SYMBOL INDEX (1 symbols across 1 files) FILE: conversor.c function main (line 6) | int main()
Condensed preview — 2 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2K chars).
[
{
"path": "README.md",
"chars": 84,
"preview": "# conversor-escalaTempC\nUm conversor de escalas de temperatura na linha de comando.\n"
},
{
"path": "conversor.c",
"chars": 1283,
"preview": "/* Conversor simples de escalas de temperatura usando somente C.*/\n/* Márcio Lopes, 04/06/2021 */\n#include <stdio.h>\n#in"
}
]
About this extraction
This page contains the full source code of the marciolopesjr/conversor-escalaTempC GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2 files (1.3 KB), approximately 523 tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.