如何声明每一个 [英] How to declare each of these

查看:65
本文介绍了如何声明每一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Person’s place of birth -> string
Person’s year of birth (1999) -> int
License Plate ("AMXT 048") -> string
Person’s age (21) -> int
Student’s mark (70.5) -> double
Cost of a product (14.50) -> double
Person’s name ("Amardeep") -> string
Person’s exact height (155.65) -> double





我的尝试:



我一直试图弄清楚如何宣布某些事情而且我已经做了一些但是这些让我疯狂,我无法弄清楚如何宣布这些。每次我尝试我的vs关闭,当它保持打开时,它会返回错误,我根本无法查看它。如果任何人都可以提供帮助那将是非常棒的。



What I have tried:

I've been trying to figure out how to declare certain things and I've done some but these are driving me nuts I cant figure out how to declare these. every time I try my vs shuts down and when it stays open it comes back with errors and i cant view it at all. If anyone can help that would be awesome of them.

推荐答案

昨天发布时:我正在试图找出正确的数据类型,然后将每个数据类型声明为变量 [ ^ ]你得到了答案 - 那么是什么阻止你现在这样做?



并且不存储出生年份和年龄 - 存储出生日期并从中计算年龄。 年龄不是固定的增值值,它会根据您提出问题的时间而变化。例如,今天有人喝酒可能是违法的,但明天是三岁生日,所以他们达到法定年龄,可以不被逮捕而饮酒。
When you posted this yesterday: I'm trying to figure out the right data type and then declare each of them into variables[^] you were given answers - so what is stopping you from doing it now?

And don't store "year of birth" and "age" - store "date of birth" and calculate "age" from that. "Age" isn't a fixed value-added it changes according to when you ask the question. For example, it may be illegal for someone to drink alcohol today, but tomorrow is third birthday so they reach the legal age and can drink without being arrested.


我建​​议你从< a href =http://www.learncs.org/>基础知识 [ ^ 并熟悉 Visual C#和Visual Basic入门 [< a href =https://msdn.microsoft.com/en-us/library/dd492171.aspxtarget =_ blanktitle =新窗口> ^ ]
I suggest you start with the basics[^] and get familiar with Getting Started with Visual C# and Visual Basic[^]


这篇关于如何声明每一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆