-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
57 lines (45 loc) · 1.15 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <stdio.h>
int main()
{
int a;
printf("Enter an integer:");
scanf("%d",&a);
printf("Square of given value is %d \n",a*2);
float b;
printf("enter float value:");
scanf("\n%f",&b);
printf("the float value is %.3f\n", b/15.6);
char c[105];
printf("enter char:");
scanf("%c",&c);
printf("%c\n",c);
double d;
printf("enter any value:");
scanf("%lf",&d);
printf("Value of double is: %lf\n", d);
unsigned int e;
printf("enter intiger:");
scanf("%u",&e);
printf("unsigned int: %u\n",e);
long int f;
printf("enter long integer value:");
scanf("%ld",&f);
printf("Long int:%ld\n",f);
short int g;
printf("enter short int:");
scanf("%hd",&g);
printf("Short int:%hd\n",g);
long long int h;
printf("enter integer value:");
scanf("%lld",&h);
printf("long long int:%lld\n",h*4);
signed char i;
printf("enter character:");
scanf("%c",&i);
printf("signed char:%c\n",i);
unsigned char j;
printf("enter character:");
scanf("%c",&j);
printf("Unsigned char:%c\n",j);
return 0;
}