This commit is contained in:
2026-09-24 14:50:14 +02:00
parent 640e7634ff
commit c53f50b3cd
5 changed files with 57 additions and 0 deletions
@@ -0,0 +1,7 @@
#include <stdio.h>
int main()
{
printf("First Name: Bill \nLast Name: Clinton\n");
return 0;
}
@@ -0,0 +1,8 @@
#include <stdio.h>
int main()
{
printf("Full Name: Brad Pitt\n");
printf("Age: 55\n");
printf("Gender: Male\n");
}
@@ -0,0 +1,8 @@
#include <stdio.h>
int main()
{
// prints your first and last name
printf("Alpha Tech\n");
return 0;
}
@@ -0,0 +1,18 @@
#include <stdio.h>
int main()
{
/*
- Program to print full name
and calculate the average
grade of a student
- Printing out functionality
is done
- Calculating the average grade
should be completed later on
- Date
- Etc
*/
printf("Alpha Tech\n");
return 0;
}
+16
View File
@@ -0,0 +1,16 @@
#include <stdio.h>
int main()
{
printf("Today I am %d years old and next year I'm going to be %d years old\n", 20, 21);
// Using an "Integer" format specifier with a "floating point" value
printf("My average grade: %d\n", 93.7); // Dangerous!
// Using a "Floating Point" format specifier
printf("My average grade: %f\n", 93.7);
// Using only 1 digit after the decimal point
printf("My average grade: %.1f\n", 93.7);
return 0;
}