首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
# include <iostream>
using namespace std;
int main()
{
    int a,b,c,temp;
    cin>>a>>b>>c;
    if(a>b)
    {
        temp=a;
        a=b;
        b=temp;
    }
......................
阅读全部 | 小黎同学 贴于 2022年10月27日 11:48     hide bbsi
#include <iostream>
using namespace std;
int main ()
{
    double r,c;
    cout<<"输入圆的半径"<<endl;
    cin>>r;
    c=2*r*3.14;
    cout<<"圆的周长为"<<c<<endl;
    return 0;
}
阅读全部 | 小黎同学 贴于 2022年10月23日 16:21     hide bbsi
#include <iostream>
using namespace std;
int main()
{
    cout<<"*****"<<endl;
    cout<<"欢迎光临"<<endl;
    cout<<"*****"<<endl;
    return 0;
}
阅读全部 | 小黎同学 贴于 2022年10月23日 09:26     hide bbsi
#include <iostream>
using namespace std;
int main()
{
    cout<<"*****"<<endl;
    cout<<"欢迎光临"<<endl;
    cout<<"*****"<<endl;
    return 0;
}
阅读全部 | 小黎同学 贴于 2022年10月23日 09:26     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) {
......................
阅读全部 | 白客风 贴于 2022年10月20日 19:09     hide bbsi
#include<stdio.h>
int main()
{int i;
 float x,max;
 printf("请输入一个数:");
 scanf("%f",&x);
 max=x;
 for(i=1;i<=9;i++)
 {
  printf("请输入第%d个数:",i+1);
  scanf("%f",&x);
  if(x>max)
......................
阅读全部 | 我是小白1 贴于 2022年10月18日 16:21     hide bbsi
/**
 * 【程序18】
 * 题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时
 *       共有5个数相加),几个数相加有键盘控制。
 * 程序分析:关键是计算出每一项的值。
 */

#include<bits/stdc++.h>
using namespace std;
int a,n,sum=0,ma;
int jf(int i){
    int m=0,f=0;
......................
阅读全部 | wszmsz 贴于 2022年10月14日 16:33     hide bbsi
/**
 * 【程序12】
 * 题目:判断101-200之间有多少个素数,并输出所有素数。
 * 程序分析:判断素数的方法:用一个数分别去除2到sqrt(这个数),如果能被整除,
 *           则表明此数不是素数,反之是素数。
 */

#include<iostream>
using namespace std;
bool is_prime(int i){
    int j=2;
    while(j<i){
......................
阅读全部 | wszmsz 贴于 2022年10月14日 16:23     hide bbsi
print("我在中国学Python\n")

# 练习一下循环的使用
for i in range(1, 21):
print(f"我爱编程中国 {i} 次")



for i in range(1,2):
    print(f "我爱编程中国 {i} 次")
阅读全部 | ieiugivip 贴于 2022年10月12日 20:26     hide bbsi
import java.util.Scanner;
public class PrintGrade{
    public static void main(String[] args){
        Scanner input  = new Scanner(System.in);
       int sc;
       System.out.println("please enter your score:");
       sc = input.nextInt();
       while (sc!=999){
           //printGrade3(sc);
           String s=printGrade3s(sc);
           System.out.println(s);
           System.out.println("please enter your score:");
......................
阅读全部 | 钟安琪 贴于 2022年10月11日 10:58     hide bbsi
上一页 22 23 24 25 26 27 28 29 30 31 下一页