simple bootstrap form example
Sure! Here is a simple example of a Bootstrap form in C:
#include <stdio.h>
int main() {
char name[50];
int age;
float height;
printf("Enter your name: ");
scanf("%s", name);
printf("Enter your age: ");
scanf("%d", &age);
printf("Enter your height: ");
scanf("%f", &height);
printf("Name: %s\n", name);
printf("Age: %d\n", age);
printf("Height: %.2f\n", height);
return 0;
}
This code creates a simple form that prompts the user to enter their name, age, and height. The user's inputs are then stored in variables name
, age
, and height
. Finally, the program displays the values entered by the user.
To compile and run this code, you will need a C compiler such as GCC. Save the code in a file with a .c extension (e.g., form.c) and then compile it using the following command:
gcc form.c -o form
After successful compilation, you can run the program using the following command:
./form
The program will then prompt you to enter your name, age, and height. After entering the values, the program will display them on the console.
I hope this example helps! Let me know if you have any further questions.