write a computer program in java in which we have to validate credit card.
ONLY REPLY IF YOU KNOW ANSWER, DON'T WRITE IRRELEVANT THINGS I WILL GIVE YOU 100 POINTS IF YOU WILL GIVE THE PROGRAM REFER TO THE IMAGE FOR HOW TO DO IT PLEASE GIVE IT BY 12 SEPTEMBER
Instructions for the program
1 don't create instance variables
2 Use proper conventions and meanigful names when creating variables, objects, classes
please insert comments (your choice)
only give answer and don't say that search on google or I will reply later
Attachments:
Answers
Answered by
4
Explanation:
The execution time of a function, a particular code segment, or a process is calculated using the clock() function. This function is available time.h. The following example may help you to understand the fact clearly.
#include <stdio.h>
#include <time.h>
#include <math.h>
int main()
{
double a, b, c;
printf("Enter the loating point base value \n");
scanf("%lf",&a);
printf("Enter the loating point power value \n");
scanf("%lf",&b);
printf("%lf, %lf",a,b);
// Calculate the time taken by fun()
clock_t t;
t = clock();
c=pow(a,b);
printf(" Value = %lf",c);
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC;
printf("pow() took %.8lf seconds to execute \n", time_taken);
return 0;
}
Similar questions