days

实验1.1

倖福魔咒の 提交于 2019-12-01 21:50:26
#include <stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); // 补足×××处的表达式,使得满足程序功能描述 if(1<=days&&days<=5) printf("workdays, fighting\n"); else if(6<=days&&days<=7) printf("weekend, relax~\n"); else printf("Ooops, not in 1~7\n"); return 0; } #include <stdio.h> int main() { char ch; printf("输入一个字符:\n"); scanf("%c",&ch); if(97<=ch&&ch<=122) ch=ch-32; printf("%c\n",ch); return 0; } 来源: https://www.cnblogs.com/qxrvyni/p/11717828.html

实验一

霸气de小男生 提交于 2019-12-01 20:31:28
#include<stdio.h> int main() {int x; printf("输入一个整数:\n"); scanf("%d",&x); if(x%2==1) printf("是奇数"); else printf("是偶数") ; return 0; } #include<stdio.h> #include<stdlib.h> int main (){ int days; printf("输入一个整数:\n"); scanf("%d",&days); if((days<6)&(days>0)) printf("workdays,fighting\n"); else if ((days>5)&(days<8)) printf("weekend,relax~"); else printf("Ooops,not in 1~7\n"); return 0; } #include<stdio.h> int main (){ char ch; printf("输入一个字符:\n"); scanf("%c",&ch); if(ch>96&&ch<123) ch=ch-32; printf("%c\n",ch); return 0; } 来源: https://www.cnblogs.com/ADSLadl85026262/p/11716992.html

x2

只愿长相守 提交于 2019-12-01 18:33:15
#include<stdio.h> int main () { int days; printf("输入一个整数:\n"); scanf("%d",&days); if(days>=1&&days<=5) printf("workdays,fighting\n"); else if(days==6||days==7) printf("weekend,relax~\n"); else printf("Ooops,not in 1~7\n"); return 0; } 来源: https://www.cnblogs.com/wyhoffice/p/11712318.html

ex.2

99封情书 提交于 2019-12-01 17:27:38
/* 程序功能: 要求用户从键盘输入1~7之间的整数 如果输入的是1~5, 提示用户是工作日,要努力工作; 如果输入的是6或7,提示用户是休息日,放松休息; 否则,提示用户输入不在合法范围 */ #include <stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); // 补足×××处的表达式,使得满足程序功能描述 if(days>=1&&days<=5) // days在1到5之间 printf("workdays, fighting\n"); else if(days>=6&&days<=7) // days是6或7 printf("weekend, relax~\n"); else printf("Ooops, not in 1~7\n"); return 0; } 来源: https://www.cnblogs.com/1140289277xjj/p/11695764.html

判断是否是工作日

ぐ巨炮叔叔 提交于 2019-12-01 17:25:33
#include<stdio.h> int main() { int days; printf("please input:\n"); scanf("%d",&days); if(days>=1&&days<=5) printf("workdays,fighting\n"); else if(days==6||days==7) printf("weekend,relax~\n"); else printf("Oops,not in 1~7\n"); getchar(); return 0; } 运行结果如下: 来源: https://www.cnblogs.com/pyp2001/p/11695728.html

Add days to current date from MySQL with PHP

本秂侑毒 提交于 2019-12-01 17:21:01
I have a fixed date from MySql startDate = 07/03/2011 I wanted to add 60 days on top this date to have an endDate. $startDate = $result['startDate']; $endDate = ??? + strtotime("+60 days"); echo $endDate; From my research, I know it has something do with strtotime, but all the sites I come across with based the start date from current workstation's time. My date is already fixed and entered prior to running and getting the endDate. Help? Thanks in advance! In addition to PHP solutions others are providing, you can create the endDate right inside of MySQL and save yourself some of the trouble:

实验二2

最后都变了- 提交于 2019-12-01 17:19:12
#include<stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(days>=1,days<=5) printf("workdays,fighting\n"); else if(days==6||days==7) printf("weekend,relax~\n"); else printf("Ooops,not in 1~7\n"); return 0; } 来源: https://www.cnblogs.com/love-elaine/p/11695462.html

Add days to current date from MySQL with PHP

北战南征 提交于 2019-12-01 16:32:33
问题 I have a fixed date from MySql startDate = 07/03/2011 I wanted to add 60 days on top this date to have an endDate. $startDate = $result['startDate']; $endDate = ??? + strtotime("+60 days"); echo $endDate; From my research, I know it has something do with strtotime, but all the sites I come across with based the start date from current workstation's time. My date is already fixed and entered prior to running and getting the endDate. Help? Thanks in advance! 回答1: In addition to PHP solutions

Linux用户用户组及权限管理

▼魔方 西西 提交于 2019-12-01 13:35:51
Linux安全上下文:   运行中的程序:进程   进程所能够访问资源的权限取决于进程的运行者身份 涉及的配置文件 /etc/passwd:保存用户信息 whatis passwd sslpasswd (1ssl) - compute password hashes passwd (1) - update user's authentication tokens passwd (5) - password file man 5 passwd name:password:UID:GID:GECOS:directory:shell The field are as follows: name This is the user's login name. It should not contain capital letters. password This is either the encrypted user password, an asterisk (*), or the letter 'x'. (See pwconv(8) for an explanation of 'x'.) UID The privileged root login account (superuser) has the user ID 0. GID This is the numeric primary

Java: convert birth data to days

你。 提交于 2019-12-01 13:32:19
问题 I really need some help with the specific assignment. The user inputs birth data (YYYY MM DD) and the program tells you how old you are in days : The outprint in console would be You are for example born 1981 11 06 You are 7068 days old. I've rewritten my code maybe 20 times without success, and any help would be so much appreciated, i'm kinda new so everything will be helpful! thanks a lot in advance, Sebastian. // the code ... :) EDITED .. I RE-WROTED THE CODE, since it didnt work anyhow i