forked from nk9699/InterCode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestc.c
More file actions
41 lines (28 loc) · 657 Bytes
/
testc.c
File metadata and controls
41 lines (28 loc) · 657 Bytes
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
// C program to show input and output
#include <stdio.h>
int main()
{
// Declare the variables
int num;
char ch;
float f;
// --- Integer ---
// Input the integer
printf("Enter the integer: ");
scanf("%d", &num);
// Output the integer
printf("\nEntered integer is: %d", num);
// --- Float ---
// Input the float
printf("\n\nEnter the float: ");
scanf("%f", &f);
// Output the float
printf("\nEntered float is: %f", f);
// --- Character ---
// Input the Character
printf("\n\nEnter the Character: ");
scanf("%c", &ch);
// Output the Character
printf("\nEntered integer is: %c", ch);
return 0;
}