首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <stdio.h>
int main() 
{
    int n,n2,n3;
    /*There are some faults in this programme*/
    
    n=5;
    n2=n*n;
    n3=n*n*n;

printf("n = %d\nn squared = %d\nn cubed = %d\n",n,n2,n3);
return 0;
......................
阅读全部 | viceboy 贴于 2022年2月19日 17:16     hide bbsi
#include <stdio.h>
int main() 
{
    int n,n2,n3;
    /*There is some faults in this programme*/
    
    n=5;
    n2=n*n;
    n3=n*n*n;

printf("n = %d\nn squared = %d\nn cubed = %d\n",n,n2,n3);
return 0;
......................
阅读全部 | viceboy 贴于 2022年2月19日 17:15     hide bbsi
#include <stdio.h>
void answer(void)
{
    printf("Dad,I am watching tv,what's up?\n");   
};

int main() 
{
printf("Rick,what are you doing?\n");

answer();

......................
阅读全部 | viceboy 贴于 2022年2月19日 17:01     hide bbsi
#include <stdio.h>

int main(void) 
{
int feet,fathoms;

fathoms=2;
feet=6*fathoms;
printf("There are %d feet in %d fathoms!\n",feet,fathoms);
printf("Yes, I said %d feet!\n",6*fathoms);
return 0;
}
阅读全部 | viceboy 贴于 2022年2月19日 16:30     hide bbsi
import RPi.CPIO as GPIO
from time import sleep

in1 = 24
in2 = 23

en = 25  # 定义输出引脚
temp1 = 1

GPIO.setmode(GPIO.BCM)  # 定义树莓派gpio引脚以BCM方式编号
GPIO.setup(in1, GPIO.OUT)
GPIO.setup(in2, GPIO.OUT)
......................
阅读全部 | 斯玥 贴于 2022年2月16日 18:25     hide bbsi
#include <stdio.h>
main()
{
    Printf("hello world.\n");
}
阅读全部 | A123FFF0731 贴于 2022年2月9日 14:11     hide bbsi
#include <stdio.h>

int main() {
printf("我在编程中国学C语言\n\n");

// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("我爱编程中国 %d 次\n", i);
}

printf("\n\n绘制一个心形图案:");
......................
阅读全部 | bvcxz 贴于 2022年1月29日 10:40     hide bbsi
# -*- coding: UTF-8 -*- 
import pymysql

def readSQL():
    #查询 SQL 语句
    sql = "SELECT id,'apiname',apiurl from apitest_apistep where apitest_apistep.Apitest_id = 2"
    #打开 MySQL 数据库链接
    coon = pymysql.connect(user='root', passwd = 'test123456',db = 'autotest', port = 3306, host='127.0.0.1',charset='utf8')
    #获取数据库操作游标
    cursor = coon.cursor()
    #执行 MySQL 查询语句
    aa = cursor.execute(sql)
......................
阅读全部 | shlgj 贴于 2022年1月28日 14:50     hide bbsi
#-*- coding:UTF-8 -*-

def wfile():
    try: 
        filename = "C:\\Users\\zh\\"+"test.html"
    except IOError:
        print("file creat error")
    else:
        fp = open(filename,'wb')
        fp.write('test'.encode('utf-8'))
        fp.close()
        
......................
阅读全部 | shlgj 贴于 2022年1月27日 19:45     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) {
......................
阅读全部 | lucase 贴于 2022年1月25日 20:22     hide bbsi
上一页 57 58 59 60 61 62 63 64 65 66 下一页