update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user