Федеральное агентство по образованию
Государственное образовательное
учреждение высшего профессионального образования
«Вятский Государственный Университет»
социально-экономический факультет
Лабораторная работа №1
Курс информатика
Тема: работа в среде Visual Basic
Киров 2009
Задание 1
Цель работы: создать
приложение для вычисления значений функций.
Эскиз формы
Вычисление функции
|
Введите х и
нажмите Enter
|
|
|
|
|
|
|
|
|
|
|
Таблица свойств
объекта
№ |
Объект |
Name |
Caption |
1 |
Form |
Form 1 |
Вычисление функции |
2 |
Lable 1 |
Lable 1 |
Введите х и нажмите Enter |
3 |
Text 1 |
txtx |
|
4 |
Command 1 |
btn Вычисление |
Вычисление |
5 |
Command 2 |
btn Результат |
Результат |
6 |
Picture 1 |
Pic 1 |
|
Список идентификаторов
Переменная |
Тип |
Идентификатор |
х |
Single |
х |
y |
Single |
y |
Непосредственные коды
процедур
Private Sub Form_Click()
Rem Вычисление функции
для заданного значения x
Print
Print "
y=x+sin(x+4*atn(1)/3)-log(abs(x)"
x =
Val(Textx.Text)
y = x + Sin(x + 4
* Atn(1) / 3) - Log(Abs(x))
Print "для x= "; x
Print "получено значение функции y= "; y
End Sub
Результаты вычислений и
выводы
Вычисление функции
|
Введите х и нажмите Enter
|
|
2
|
|
Задание 2
Цель работы: создать
приложение, в котором можно вычислить значение суммы функций.
Эскиз формы
Form 1
|
Пуск
|
|
|
S=
|
|
|
|
|
|
|
|
Завершение
|
|
|
|
|
|
Таблица свойств
объекта
№ |
Объект |
Name |
Caption |
1 |
Form |
Form 1 |
Form 1 |
2 |
Text 1 |
txtx |
|
3 |
Command 1 |
Command 1 |
Пуск |
4 |
Command 2 |
Command 2 |
Завершение |
5 |
OLE 1 |
OLE 2 |
|
6 |
Picturebox |
Picture 1 |
|
Список идентификаторов
Переменная |
Тип |
Идентификатор |
х |
Single |
х |
Непосредственные коды
процедур
Private Sub Command1_Click()
Sum = 0 'начальное значение суммы
sump = 0 'начальная сумма положительных
значений функции
sumo = 0 'начальная сумма отрицательных
значений функции
X = Val(Textx.Text) 'преобразование функцией Val свойства Текст в числовое значение
For k = 1 To
10
y = Sin(X * k)
+ Cos(k / X)
If y > 0
Then
sump = sump +
y
Else
sumo = sumo +
y
End If
Next k
Sum = sump +
sumo
Picture1.Print
"сумма положительных значений функции"; sump
Picture1.Print "сумма отрицательных значений функции"; sumo
Picture1.Print "сумма значений функции"; Sum
Private Sub
Command2_Click()
End
End Sub
Результаты вычислений
и выводы
Form 1
|
Пуск
|
|
2,3
|
S=
|
|
|
|
|
|
Сумма положительных значений функции 2,87637274384731
Сумма отрицательных значений функции -5,74964601205689
Сумма отрицательных значений функции -2,87327326820958
|
|
|
Завершение
|
|
|
|
|
|
Другие работы по теме:
Визуальное программирование
Визуализация - это процесс графического отображения сложных процессов (в данном случае построения) на экране компьютера в виде графических примитивов (графических фигур).
Greating 3D-Graphics on visual basic
Program automatic system on visual basic for graiting 3D-Graphics. Text of source code for program functions. Setting the angle and draw the rotation. There are functions for choose the color, finds the normal of each plane, draw lines and other.
Завадостійке кодування на основі циклічних кодів
Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRC32", "CRC32CRC32.csproj", "{EE28F805-6DA0-4E7B-89A5-A3B245E1441D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {EE28F805-6DA0-4E7B-89A5-A3B245E1441D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EE28F805-6DA0-4E7B-89A5-A3B245E1441D}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE28F805-6DA0-4E7B-89A5-A3B245E1441D}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE28F805-6DA0-4E7B-89A5-A3B245E1441D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE
Работа в среде Visual Basic
Федеральное агентство по образованию Государственное образовательное учреждение высшего профессионального образования «Вятский Государственный Университет» социально-экономический факультет
Мови та системи програмування
ІНФОРМАТИКА Тема: Мови та системи програмування Однією з найпоширеніших мов з програмування серед сучасних мов високого рівня, що використовуються в ПК, є мова Visual BASIC.
Microsoft Visual Basic 5 0
Microsoft Visual Basic 5.0 Microsoft Visual Basic 5.0 - это мощная система программирования, позволяющая быстро и эффективно создавать приложения для Microsoft Windows’95 и Microsoft Windows’NT
Информационная поисковая система
Автономно некоммерческая организация Гуманитарно-инженерный колледж Курсовая работа по дисциплине: «Технологии разработки программных продуктов»
Color Theory Essay Research Paper Color TheoryColor
Color Theory Essay, Research Paper Color Theory Color theory encompasses a multitude of definitions, concepts and design applications. All the information would fill several encyclopedias. As an introduction, here are a few basic concepts.
Light Matter Essay Research Paper Inner LightIn
Light Matter Essay, Research Paper Inner Light In order to understand what light is one has to understand how vision works. The process of visual perception is incredibly complex, involving many functions of the brain. In Arthur Zajonc’s book “Catching the Light,” he writes, “?vision requires far more than a functioning physical organ.
Baby Eye Testing Essay Research Paper U
Baby Eye Testing Essay, Research Paper U OF T PROFESSORS DEVISE BETTER WAY TO TEST SIGHT IN BABIES In a darkened room at Toronto’s Hospital for Sick Children, a baby, its head dotted with electrodes, sits in its mother’s lap and watches flashing black and white checkerboards and stripes on a television screen.
Senseless A False Sense Of Perception Essay
, Research Paper Senseless: A False Sense of Perception I feel as though I have no choice but to be a skeptic about our ability to know the world on the sense experience given the information that is being
Convergence Of The Twain Essay Research Paper
“The Convergence of the Twain” Personification is “endowing inanimate objects or abstract ideas with life or human characteristics” (Kirszner 2058). In the poem “The Convergence of the Twain” the author?s use of personification allows the reader to make a more fluid transition from the past to the present.
The NonDesigner
’s Design Book Essay, Research Paper The Non-Designer s Design Book By Robin Williams I chose this book because I am very interested in the design of a page, whether it be an advertisement, invitation, or feature story. I learned some important principles to follow. This book was easy to read and understand.
Programming Languaguages Essay Research Paper Programming LanguagesA
Programming Languaguages Essay, Research Paper Programming Languages A programming language is a set of English-like instructions that includes a set of rules for putting the instructions together to create commands. A translator changes the English-like commands into numeric code that the computer can understand.
Costa Sakellariou Essay Research Paper Costa Sakellariou
Costa Sakellariou Essay, Research Paper Costa Sakellariou Visual art can definitely be seen as a language. With every artist there is always some sort of meaning that they are trying to convey to the viewers of their work. The means of how they deliver that message is the language in which their work uses. In Costa Sakellariou?s work I especially felt there was some sort of language being spoken.
Learning Styles Essay Research Paper Every person
Learning Styles Essay, Research Paper Every person learns differently. From kindergartner to postgraduate levels, only students can do the earning, and they do it in their own particular, individual learning styles. Some children pick something up the first time they hear it. Others may not grasp a concept until they?ve had the chance to see it in print, or to write it themselves.
Learning Styles Essay Research Paper LEARNING STYLESPeople
Learning Styles Essay, Research Paper LEARNING STYLES People not only learn at different rates, but also in different ways. Some people want everything written down, others prefer to listen. Some prefer small group settings rather than large group discussions; others like to listen to a lecture and translate it into pictorial doodles in a notebook.
Learning Styles Compare
& Contrast Essay, Research Paper Learning Styles The purpose of this paper is to identify and compare the meaning as well as the differences of two learning styles as they relate to both the academic and professional realm. I have chosen these two styles because I believe the majority of people are either visual or auditory learners.
The Brain
’s Cerebral Cortex Essay, Research Paper The brain is three pounds of tissue that are part of the nervous system. It is one of the two basic parts and contains a bout 100 billion nerve cells.
Visual Art Essay Research Paper VISUAL ARTS
Visual Art Essay, Research Paper VISUAL ARTS “The physical impossibility of death in the mind of someone living” By Damien Hirst (photo courtesy of the saatchi collection)
Dragon Ball Z Web Pages Essay Research
Paper When I think of cartoons, I think of Dragon Ball Z. dragon Ball Z is an Anime series from Japan, currently airing on cartoon Network. When I received this assignment I
Memory Essay Research Paper Memory is the
Memory Essay, Research Paper Memory is the process of storing and retrieving information in the brain. Memory is viewed as a three-step process, which include sensory memory, short-term memory, and long-term memory. Along with memory there is also forgetting. There are two types of forgetting, availability and accessibility.
Dover Beach Essay Research Paper Dover Beachby
Dover Beach Essay, Research Paper ?Dover Beach? by: Matthew Arnold In the poem ?Dover Beach? by: Matthew Arnold there is a lot of irony, appeal to the auditory and visual sense, and illusions. The tone in this poem is very sad and dismal, but he shows us how to keep faith and hope in spite of that and how important being honest, true, and faithful to one another, really is.
Art 5 Essay Research Paper ArtArt comes
Art 5 Essay, Research Paper Art comes in many different forms. It isn t just visual work done on canvas using a certain medium, like pencils, watercolors, or oils. Art is just a way in which an individual expresses his or her inner most self, so that others can understand that individuals personality or feelings to their fullest.
Design Structure Essay Research Paper Basic ideas
Design Structure Essay, Research Paper Basic ideas and Concepts of Software DesignAn Interface to the End-UserThe Project Management System was designed with the goal that the end-user can handle the system on his own.The interactive user interface is based on the Windows interface.The interface programs use standard software of the market like Visual Basic, Microsoft Access and Crystal Reports.DocumentationThe software should be documented.
What Are Visual Defects And How Common
Are They ? Essay, Research Paper What Are Visual Defects and How Common Are They ? Nate Schackow 2nd Period December 17, 1996 The human eye does alot more than allowing you to see. It is very
Basic TrainingMen And Women Together Essay Research
Paper Should Men and Women Take Basic Training Together The Untied States Armed Forces consist of the Army, Navy, Air Force, and Marines; it has been in existence for many years. The first step of military life once someone joins is basic training. Just as the name implies, it is here where a recruit learns the first skills of being a warrior and how to fight battles.