Answer:
Explanation:
The following code is written in Java and it asks you for your age and then prints out the exact date from your birthday that you will turn 10,000 days old.
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("What is your age?");
int age = in.nextInt();
int daysLeft = (10000 - (age*365));
Date birthday = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(birthday);
cal.add(Calendar.DATE, daysLeft);
Date modifiedDate = cal.getTime();
System.out.println(modifiedDate);
}
}
Answer:
atof
Explanation:
atof function is used to convert a string to a double.
It takes a single parameter of type const char * and returns a double value.
The function signature is: double atof (const char* str);
In order to use this function in the code, you need to include the header file <stdlib.h>
For example:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char str[5] = "0.01";
double d = atof(str);
printf("Value = %f\n", d);
return 0;
}
Answer:
"Connection Refused"
Explanation:
This is the error message that is returned when the server is not listening on the correct port, or the server is offline.
Cheers.
The current version of office is "Office 19" most people use "Office 365" though.
A "Pdf" or "Portable Document Format."