c
来源:互联网 发布:马尔可夫矩阵法例题 编辑:程序博客网 时间:2024/06/15 13:56
1题目内容:
编写一个程序, 接收用户录入的日期信息并且将其显示出来. 其中, 输入日期的形式为月/日/年(mm/dd/yy), 输出日期的形式为年月日(yy.mm.dd)。
以下为程序的运行结果示例:
Enter a date (mm/dd/yy):
12/03/2015↙
You entered the date: 2015.12.03
输入格式: "%d/%d/%d"
输出格式:
输入提示信息:"Enter a date (mm/dd/yy):\n"
输出格式:"You entered the date: %04d.%02d.%02d\n"
#include <stdio.h>int main(){ printf("Enter a date (mm/dd/yy): "); int year = 0, month = 0, day = 0; scanf("%d/%d/%d", &month, &day, &year); printf("You entered the date %02d%02d%02d", year, month, day); return 0;}
阅读全文
0 0
- c
- c
- c
- c
- C
- c
- c
- c
- C+
- c
- C
- c
- c
- c
- C
- C
- c
- C
- C++网站开发MVC框架TreeFrog Framework教程——4.生成器
- python ---- set
- JavaWeb(八)Cookie入门
- Okhttp使用和源码分析二(OkHttp3.x用法)
- Oracle 子查询
- c
- Android主题切换(一),基本使用流程
- FMDB解析和简单使用
- 【LeetCode】120. Triangle
- OPENCV3的匹配
- java虚拟机之垃圾收集器与内存分配策略
- AndroidStudio获得屏幕分辨率
- Android adb devices 结果list of devices attached
- 记录我第一次在linux上部署j2ee项目