c7
This commit is contained in:
parent
abc01ee776
commit
b3554501ed
13
C7/ex3.c
Normal file
13
C7/ex3.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
float radius, height;
|
||||||
|
|
||||||
|
printf("Enter radius: ");
|
||||||
|
scanf("%f", &radius);
|
||||||
|
printf("Enter height: ");
|
||||||
|
scanf("%f", &height);
|
||||||
|
|
||||||
|
printf("Surface area: %f\n", 2*M_PI*radius*radius + 2*M_PI*radius*height);
|
||||||
|
}
|
11
C7/ex4.c
Normal file
11
C7/ex4.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char name[200] = { 0 };
|
||||||
|
|
||||||
|
printf("What is your name? ");
|
||||||
|
scanf("%s", name);
|
||||||
|
|
||||||
|
printf("Hello %s\n", name);
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user