用Visual Studio2005编程
麻烦说详细点哦,我刚学1.编写一个程序,从键盘上输入3个数,输出这3个数的积及它们的和。要求编写成控制台应用程序。完整代码:2.编写程序。将一年中12个月,建立一个枚举类...
麻烦说详细点哦,我刚学1. 编写一个程序,从键盘上输入3个数,输出这3个数的积及它们的和。要求编写成控制台应用程序。完整代码: 2. 编写程序。将一年中12个月,建立一个枚举类型数据,并对其进行调用。完整代码: 3. 编写程序。实现求1 + 3 + 5 + … + 99的和,并输出求出的和。完整代码: 4. 编写程序。检查变量的值是否大于65。如果是,则输出文本“变量的值大于65!”。完整代码:
展开
3个回答
展开全部
楼主你太不厚道了吧 这么多一分多没有啊 你要哪种语言编的啊
楼主我用vb编的
1.Module Module1
Sub Main()
Console.WriteLine("请输入第一个数")
Dim m As String = Console.ReadLine()
Console.WriteLine("清输入第二个数")
Dim s As String = Console.ReadLine()
Console.WriteLine("请输入第三个数")
Dim k As String = Console.ReadLine()
Console.WriteLine("三个数的和为:{0}", (Convert.ToInt32(m) + Convert.ToInt32(s) + Convert.ToInt32(k)).ToString)
Console.WriteLine("三个数的积为:{0}", (Convert.ToInt32(m) * Convert.ToInt32(s) * Convert.ToInt32(k)).ToString)
Console.Read()
End Sub
End Module
2.Public Class Form1
Public Enum Month
Jan = 1
Feb = 2
Mar = 3
Apr = 4
May = 5
Jun = 6
Jul = 7
Aug = 8
Sep = 9
Oct = 10
Nov = 11
Dec = 12
End Enum
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Month, b As Integer
a = Month.Jul
b = a
TextBox1.Text = b.ToString
End Sub
End Class
3.Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer, sum As Integer
For i = 1 To 99 Step 2
sum = sum + i
Next
TextBox1.Text = sum.ToString
End Sub
End Class
4.Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i = InputBox("")
If i > 65 Then
TextBox1.Text = "变量的值大于65!"
Else
TextBox1.Text = ""
End If
End Sub
End Class
楼主我用vb编的
1.Module Module1
Sub Main()
Console.WriteLine("请输入第一个数")
Dim m As String = Console.ReadLine()
Console.WriteLine("清输入第二个数")
Dim s As String = Console.ReadLine()
Console.WriteLine("请输入第三个数")
Dim k As String = Console.ReadLine()
Console.WriteLine("三个数的和为:{0}", (Convert.ToInt32(m) + Convert.ToInt32(s) + Convert.ToInt32(k)).ToString)
Console.WriteLine("三个数的积为:{0}", (Convert.ToInt32(m) * Convert.ToInt32(s) * Convert.ToInt32(k)).ToString)
Console.Read()
End Sub
End Module
2.Public Class Form1
Public Enum Month
Jan = 1
Feb = 2
Mar = 3
Apr = 4
May = 5
Jun = 6
Jul = 7
Aug = 8
Sep = 9
Oct = 10
Nov = 11
Dec = 12
End Enum
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Month, b As Integer
a = Month.Jul
b = a
TextBox1.Text = b.ToString
End Sub
End Class
3.Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer, sum As Integer
For i = 1 To 99 Step 2
sum = sum + i
Next
TextBox1.Text = sum.ToString
End Sub
End Class
4.Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i = InputBox("")
If i > 65 Then
TextBox1.Text = "变量的值大于65!"
Else
TextBox1.Text = ""
End If
End Sub
End Class
展开全部
这不是你程序的问题。提示的未加载任何符号的意思是说在msvcrt.dll中没有你需要的symbol。
我也碰到过这种问题。但是我当时是有一个函数将整个程序生成了一个可执行文件。你可以把你的debug文件夹删除以后重新编译一下。然后看看会不会生成.exe文件。如果有的话,直接运行一下不是也可以嘛??
我也碰到过这种问题。但是我当时是有一个函数将整个程序生成了一个可执行文件。你可以把你的debug文件夹删除以后重新编译一下。然后看看会不会生成.exe文件。如果有的话,直接运行一下不是也可以嘛??
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询