You are on page 1of 1

// a c program to display current time and data

#include<stdio.h>

#include<time.h>

int main()

time_t t;

time(&t);

printf("\nThis program has been writeen at (data and time): %s", ctime(&t));

return 0;

// a c program to check perfect square.

#include<stdio.h>

#include<math.h>

int main()

int num;

int iVar;

float fVar;

printf("Enter an integer number: ");

scanf("%d",&num);

fVar=sqrt((double)num);

iVar=fVar;

if(iVar==fVar)

printf("%d is a perfect square.",num);

else

("%d is not a perfect square.",num);

return 0;

You might also like