Aktualizovat „du3/program.c“
This commit is contained in:
parent
d7319a7e5c
commit
300898b676
@ -1,30 +1,26 @@
|
|||||||
#include <stdio.h>
|
#define _XOPEN_SOURCE
|
||||||
#include<ctype.h>
|
#include <stdio.h>
|
||||||
#include<math.h>
|
#include <stdlib.h>
|
||||||
int main()
|
#include <string.h>
|
||||||
{
|
#include <time.h>
|
||||||
float x=0;
|
|
||||||
float value =0;
|
int main()
|
||||||
int count =0;
|
{
|
||||||
float arr[50];
|
printf("Enter date: ");
|
||||||
while(scanf("%f",&value)!=EOF){
|
|
||||||
if(isalpha(value)!=0){
|
char dateStr[11];
|
||||||
return 0;
|
struct tm t;
|
||||||
}
|
|
||||||
if(count !=0){
|
fgets(dateStr, 11, stdin);
|
||||||
arr[count-1]=value;
|
|
||||||
}
|
strptime(dateStr, "%d.%m.%Y", &t);
|
||||||
else{
|
|
||||||
x=value;
|
t.tm_mday += 7;
|
||||||
}
|
|
||||||
count++;
|
strftime(dateStr, sizeof(dateStr), "%d.%m.%Y", &t);
|
||||||
}
|
|
||||||
value=0;
|
printf("The day of the week is %s", dateStr);
|
||||||
for(int i =0;i<count;i++){
|
exit(EXIT_SUCCESS);
|
||||||
value+=arr[count]*pow(x,count-i);
|
|
||||||
}
|
return 0;
|
||||||
printf("Vysledok je :%f\n",value);
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user