Added programs for 2nd half of assignment
This commit is contained in:
BIN
programs/printf-formats/main
Executable file
BIN
programs/printf-formats/main
Executable file
Binary file not shown.
BIN
programs/printf-formats/main-p-1-1
Executable file
BIN
programs/printf-formats/main-p-1-1
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-1-1.c
Normal file
14
programs/printf-formats/main-p-1-1.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %f\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-1-2
Executable file
BIN
programs/printf-formats/main-p-1-2
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-1-2.c
Normal file
14
programs/printf-formats/main-p-1-2.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n = 10;
|
||||||
|
double x = 25.3;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %lf\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-2-1
Executable file
BIN
programs/printf-formats/main-p-2-1
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-2-1.c
Normal file
14
programs/printf-formats/main-p-2-1.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %d\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-2-2
Executable file
BIN
programs/printf-formats/main-p-2-2
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-2-2.c
Normal file
14
programs/printf-formats/main-p-2-2.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %lf\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-3-1
Executable file
BIN
programs/printf-formats/main-p-3-1
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-3-1.c
Normal file
14
programs/printf-formats/main-p-3-1.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%f", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-3-2
Executable file
BIN
programs/printf-formats/main-p-3-2
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-3-2.c
Normal file
14
programs/printf-formats/main-p-3-2.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%lf", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-4-1
Executable file
BIN
programs/printf-formats/main-p-4-1
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-4-1.c
Normal file
14
programs/printf-formats/main-p-4-1.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%d", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
programs/printf-formats/main-p-4-2
Executable file
BIN
programs/printf-formats/main-p-4-2
Executable file
Binary file not shown.
14
programs/printf-formats/main-p-4-2.c
Normal file
14
programs/printf-formats/main-p-4-2.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%lf", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
14
programs/printf-formats/main.c
Normal file
14
programs/printf-formats/main.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
printf("Int n: "); scanf("%d", &n);
|
||||||
|
printf("Doble n: "); scanf("%f", &x);
|
||||||
|
|
||||||
|
printf("Integer n is %d\n", n);
|
||||||
|
printf("Double percision floating point decimal x is %f\n", x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user