提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 刘思杰

    20人对此回答表示赞同

    int n=100;
    int result = 0;
    for(int i=1;i<=n;i++)
    result += i;(第二题此处换成:result *= i;)
    展开
    20
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • Austin

    19人对此回答表示赞同

    int tmp=0;
    for(int i=1;i<=n;i++)
    {
    tmp = tmp +n;
    }
    ------------
    int tmp=1;
    for(int i=1;i<=n;i++)
    {
    tmp = tmp*i;
    }
    展开
    19
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 象牙_Sanya

    18人对此回答表示赞同

    int a = n;
    int num=0;
    int result=1;
    for(int i=1;i<= a; i++)
    {
    num +=i;
    result = result * i;
    }
    展开
    18
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 安守本分

    16人对此回答表示赞同

    int n=100;
    int i;
    int result1=0;
    int result2=1; //注意不能为0
    for (i=1;i<=n;i++)
    {
    result1=result1+i;
    restul2=result2*i;
    }
    展开
    16
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 张发宗

    11人对此回答表示赞同

    复制即可运行
    直接用for循环不就可以了。
    n如果是输入的那么就:
    using System;
    using System.Text;

    class Test{
    static void Main(){
    Console.WriteLine("请输入一个数字:");
    int n=Convert.ToInt32(Console.ReadLine());
    Console.WriteLi
    展开
    11
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 胖宅

    9人对此回答表示赞同

    for循环...
    展开
    9
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • Camila

    9人对此回答表示赞同

    for
    也可以定义100个变量相加或者相乘。
    展开
    9
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • Eli4321

    6人对此回答表示赞同

    控制台应用程序:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace ConsoleApplication1
    {
    class Program
    {

    static void Main(string[]
    展开
    6
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 亚马逊河游客

    4人对此回答表示赞同

    没事时写的 应该对你有帮助...

    /// <summary>
    /// 算术类
    /// peng@hotmail.com
    /// </summary>
    public class Arithmetic
    {
    /// <summary>
    /// 阶加
    /// </summary>
    展开
    4
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部