Wednesday, March 24, 2021

20.1. Write a program that reads and displays any number.

#include<stdio.h>
#include<conio.h> 
#include<stdlib.h>
void main ()
{
int *n;
clrscr();
n=(int *)malloc(sizeof(int));
printf("Enter any number: "); 
scanf("%d", n);
printf("The number is %d",*n);
getch ();
}

No comments:

Post a Comment