【程序设计】 --------------------------------------------------------- 题目:假设输入的是字母,若是大写字母输出1,小写字母输出0。 -------------------------------------------------------*/ #include <stdio.h> void bky(); int fun(char c) { /**********Begin**********/ /********** End **********/ } void main() { char c1; int c2; printf("Please input a char:\n"); c1=getchar(); c2=fun(c1); printf("%d\n",c2); bky(); } void bky() { FILE *IN,*OUT; int i; char iIN; int iOUT; IN=fopen("in.dat","r"); if(IN==NULL) { printf("Please Verify The Currernt Dir..it May Be Changed"); } OUT=fopen("out.dat","w"); if(OUT==NULL) { printf("Please Verify The Current Dir.. it May Be Changed"); } for(i=0;i<2;i++) { fscanf(IN,"%c",&iIN); iOUT=fun(iIN); fprintf(OUT,"%d\n",iOUT); } fclose(IN); fclose(OUT); }
时间: 2023-08-03 08:05:30 浏览: 178
这是一道C语言的程序设计题,要求实现一个函数fun,输入一个字符c,如果c是大写字母就返回1,如果c是小写字母就返回0。在主函数中,提供了一个输入字符的方法,调用函数fun并输出结果。另外,程序中还有一个函数bky,它的作用是从in.dat文件中读入两个字符,然后调用fun函数并将结果写入out.dat文件中。
相关问题
使用element-ui
Element-UI是一套基于Vue.js的桌面端组件库,它提供了丰富的UI组件和交互效果,可以帮助开发者快速构建美观、易用的Web应用程序。
使用Element-UI的步骤如下:
1. 安装Element-UI:可以通过npm或yarn安装Element-UI,命令如下:
```
npm install element-ui
```
或
```
yarn add element-ui
```
2. 引入Element-UI:在项目的入口文件中引入Element-UI的样式和组件,示例代码如下:
```javascript
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
```
3. 使用Element-UI组件:在Vue组件中可以直接使用Element-UI提供的各种组件,例如按钮、表单、弹窗等。示例代码如下:
```html
<template>
<div>
<el-button type="primary">主要按钮</el-button>
<el-input v-model="inputValue" placeholder="请输入内容"></el-input>
<el-dialog :visible.sync="dialogVisible">
<span>这是一个弹窗</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
inputValue: '',
dialogVisible: false,
};
},
};
</script>
```
以上就是使用Element-UI的基本步骤。通过引入Element-UI的样式和组件,我们可以快速构建出符合设计规范的界面,并且可以方便地进行交互操作。
elementui-plus
ElementUI-Plus是一个基于Vue.js的开源UI组件库,它是ElementUI的升级版。ElementUI-Plus提供了一套丰富的组件和工具,可以帮助开发者快速构建现代化的Web应用程序。
ElementUI-Plus的特点包括:
1. 组件丰富:ElementUI-Plus提供了大量的组件,包括按钮、表单、表格、弹窗、导航等,可以满足各种常见的页面需求。
2. 风格美观:ElementUI-Plus采用了现代化的设计风格,界面简洁美观,符合当下的用户体验要求。
3. 响应式布局:ElementUI-Plus支持响应式布局,可以适应不同屏幕尺寸的设备,提供良好的用户体验。
4. 可定制性强:ElementUI-Plus提供了丰富的主题和样式配置选项,可以根据项目需求进行个性化定制。
5. 文档完善:ElementUI-Plus提供了详细的文档和示例代码,方便开发者学习和使用。
相关推荐
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)