首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include<stdio.h>
int main()
{
    int n;
    int i=0;
    printf("请输入一个整数:");
    scanf("%d",&n);
    if(n<1){
        printf("非法数据!!!");
        return 1;
    }
    while(i<n){
......................
阅读全部 | 大神哦 贴于 2019年8月30日 13:36     hide bbsi
//方法1://
#include<stdio.h>
int main()
{
    int n;
    int i=0;
    printf("请输入一个整数:\n");
    scanf("%d",&n);
    if(n<1){
        printf("非法数据!!!");
    }else{
        while(i<n){
......................
阅读全部 | 大神哦 贴于 2019年8月30日 12:44     hide bbsi
#include<stdio.h>
int main()
{
    char letter;
    printf("请输入一个字母:");
    scanf("%c",&letter);
    if((letter>='a')&&(letter<='z')){
        printf("%c是小写字母,",letter);
        printf("对应的大写字母是:%c\n",letter-('a'-'A'));
    }else if((letter>='A')&&(letter<='Z')){
        printf("%c 是大写字母,",letter);
        printf("对应的小写字母是:%c\n",letter-('A'-'a'));
......................
阅读全部 | 大神哦 贴于 2019年8月30日 11:06     hide bbsi
#include<stdio.h>
int main()
{
  int year;
       printf("请输入年份:");
       scanf("%d",&year);
  if(year<=0){
       printf("非法数据");}
  else if((year%400==0)||((year%100!=0)&&(year%4==0))) {
       printf("%d年份是闰年",year);}
  else{
       printf("%d年份是平年",year);}
......................
阅读全部 | 大神哦 贴于 2019年8月30日 10:53     hide bbsi
Sub cal_24k()
Dim sheet_name As String
Dim r1, flag As Integer

sheet_name = InputBox("please input sheetname")
flag = 0

For i = 1 To Sheets.Count
 If sheet_name = Sheets(i).Name Then
 flag = 1
  Exit For
  End If
......................
阅读全部 | qunxingw 贴于 2019年8月28日 10:02     hide bbsi
#include <stdio.h>
#include <stdlib.h>

#define LENGTH 3

int main(void) {
    double *map(double (*)(double), const double *, int); // 映射函数
    double pow2(double);

    double * p = map(pow2, (double[LENGTH]){1.2, 2.8, 3.4}, LENGTH);

    for (int i = 0; i < LENGTH; ++i) {
......................
阅读全部 | 沈和 贴于 2019年8月28日 08:05     hide bbsi
#include <stdio.h>
#include <iostream>
#include <math.h>

float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}

float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
......................
阅读全部 | 快乐的小屁孩 贴于 2019年8月22日 13:33     hide bbsi
/**
 * js排序算法 --- 冒泡排序
 *
 */


 
function bubbleSort(arr) {
    let i,j;
    for(i=0;i<arr.length;i++){
        for(j=0; j<=arr.length-i;j++){
            if(arr[j]>arr[j+1]){ //  ">"从小到大排序
......................
阅读全部 | mnmnddc 贴于 2019年8月22日 00:42     hide bbsi
/*
input:
output:
*/
#include<stdio.h>
#include<stdlib.h>
using namespace std;
int cmp(const void* A, const void* B){
    return *(int*)A - *(int*)B;
}
int main(){
int n,arr[1001];
......................
阅读全部 | 擎天柱 贴于 2019年8月21日 22:13     hide bbsi
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int love[9][37] = 
{
0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
......................
阅读全部 | 神犇dengyuhy 贴于 2019年8月19日 16:59     hide bbsi
上一页 114 115 116 117 118 119 120 121 122 123 下一页