Visual Programming

In: Other Topics

Submitted By TheMiaph
Words 457
Pages 2
1. using System; using System.Collections.Generic; using System.Linq; using System.Text;

namespace Csharp_exercises
{
class Program
{
static void Main(string[] args)
{

int x,y,z;

Console.Write("Enter value 1:"); x = int.Parse(Console.ReadLine());
Console.Write("Enter value 2:"); y = int.Parse(Console.ReadLine());
Console.Write("Enter value 3:"); z = int.Parse(Console.ReadLine());

if (x > y) if (x > z) Console.Write("The greatest value is:{0}.",x); else Console.Write("The greatest value is:{0}.", z); else if (y > z) Console.Write("The greatest value is:{0}.",y); else Console.Write("The greatest value is:{0}.",z);

Console.ReadLine(); } }
}

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

namespace Csharp_exercises
{
class Program
{
static void Main(string[] args)
{

float quiz_score; float mid_score; float final_score; float avg;
Console.Write("Enter quiz score:"); quiz_score=float.Parse(Console.ReadLine()); Console.Write("Enter mid-term score:"); mid_score = float.Parse(Console.ReadLine());
Console.Write("Enter final score:"); final_score = float.Parse(Console.ReadLine()); avg = (quiz_score +mid_score+final_score) / 3;

if (avg >= 90) Console.WriteLine("Grade A"); else if ((avg >= 70) && (avg < 90)) Console.WriteLine("Grade B"); else if ((avg >= 50) && (avg < 70)) Console.WriteLine("Grade C"); else if (avg < 50) Console.WriteLine("Grade F"); else Console.WriteLine("Invalid input");

Console.ReadLine(); } }
}

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

namespace Csharp_exercises
{
class Program
{
static void Main(string[] args)
{
char key;
Console.Write("Press a number key:"); key = (char)Console.Read(); switch (key)
{
case…...

Similar Documents

Programming

...Calling an external function or program that is written in a different programming language like a Java program within a Visual Basic program you first need to know the Function fundamentals that’s executed in any programming language. I came across this website called maples, where they have the ability to connect to and call functions from other programming languages. Maple uses this for various reasons. Like all other languages, the F# function has a name, it can have parameters, has a body and takes arguments. F# also supports functional programming constructs such as handling functions as values, depleting unnamed functions in expressions, composition of functions to form new functions, curried functions, and the implicit definition of functions by way of the partial application of function arguments. Maple's help system documents all the External Calling functions so you can see what is available. Briefly, however there are functions for converting Maple types to C and back, creating and interacting with Maple data structures creating and interacting with Maple language elements (names, procedures, etc), printing to the Maple interface, memory allocation, evaluating Maple statements and raising exceptions. There is even a C interface to the Task Programming Model. The function-name is an identifier that represents the function. The parameter-list consists of successive parameters that are separated by spaces. You can specify an explicit type for each parameter, as......

Words: 394 - Pages: 2

Programming

...times 4 and stores the result in a c. Divides a by 3.14 and stores the result in b d. Subtracts 8 from b and stores the result in a 8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. 9. Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. 11. If the following pseudocode were an actual program, what would it display? Declare Integer a = 5 Declare Integer b = 2 Declare Integer c = 3 Declare Integer result Set result = a + b * c Display result 12. If the following pseudocode were an actual program, what would it display? Declare Integer num = 99 Set num = 5 Display num PROGRAMMING EXERCISES (Input, processing, and output) 2. Sales Prediction A company has determined that its annual profit is typically 23 percent of total sales. Design a program that asks the user to enter the projected amount of total sales, and then displays the profit that will be made from that amount. Hint: Use the value 0.23 to represent 23 percent 3. Land Calculation One acre of land is equivalent to 43,560 square feet. Design a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract. Hint: Divide the amount entered by 43,560 to get the number of acres. 4. Total Purchase A customer is a store is purchasing five items. Design a program that asks......

Words: 1054 - Pages: 5

Week 8 Discussion: Visual Basic Programming

...•Imagine that your company has decided to expand to the Web. You want to reuse some data entry code that has been developed in Windows and place it on the Web. Visual Basic code has the capability to run on a Web server. Explain the process you would go through to develop a Web page locally. You can create HTML pages and Web Forms pages as the user interface for a Web application. HTML pages are generally used for static content. In contrast, Web Forms pages give you a programmable interface that works much like a Visual Basic form, except that the user interface is rendered in a Web browser or other Web device. Web Forms pages are built on the ASP.NET Page framework. Each Web Forms page is an object that derives from the ASP.NET Page class, which acts as a container for controls. The page actually consists of two files: an .aspx file that contains the UI elements (static HTML text and control elements) and a class file that contains the code that runs the page. •Internet Explorer is the number-one Web browser, but many users are moving to Chrome and Firefox Web browsers. Each of these browsers has slight differences in displaying the screen content. Explain how this can occur to your Web screen and any ways to prevent this. Web Forms applications are, by definition, platform-independent — that is, they are "reach" applications. Users can interact with your application regardless of what type of browser they have and even what type of computer they are using. At the same......

Words: 705 - Pages: 3

Programming

...Definitions ........................................................................................16 Datafile ............................................................................................................16 Record ..............................................................................................................16 Field ..................................................................................................................16 Key....................................................................................................................16 Search Key........................................................................................................17 A Quick Introduction to Object-Oriented Programming ......................................18 Problems with Procedural Languages ..............................................................18 Objects in a Nutshell ........................................................................................19 A Runnable Object-Oriented Program ............................................................21 Inheritance and Polymorphism ........................................................................24 New C++ Features ................................................................................................25 The string Class..............................................................................................25 The vector......

Words: 10065 - Pages: 41

Visual Programming

...Riphah International University, Faisalabad Visual Programming – Assignment 2 Functions and Control Sructures Instructions for Submission Submission Guidelines: • Your code must be properly commented and your code should be neat and nested format. • All the steps involved in solution of each question should be written. Just Answers are not required • Try NOT to copy paste data from your friends etc. • This is an individual assignment. PLAGIARISM IS NOT ACCEPTABLE! In case of plagiarism you will get ZERO MARKS for that question • Please do not copy paste program from your friend. • Complete the assignment nicely and submit .cpp files on email you can zip all program in one file then submit that file • Submit files in format like “yourname_yourclass_q1.cpp, yourname_yourclass_q2.cpp”, other file naming convention will not be accepted. • Submit files on uzairsaeed@riphahfsd.edu.pk • Other questions except program can be solved on Microsoft Word or alike, and plagiarism is 30% with proper reference is allowed only • Last date of submission 02-October-2013 11:55 pm Question 1: Write a function that receives 5 integers and returns the sum and average of these numbers. Call this function from main( ) and print the results in main(). Question 2: A 5-digit positive integer is entered through the keyboard, write a function to calculate sum of digits of the 5-digit number. Question 3: A positive integer is entered through the keyboard and taking input and terminates on sentinel......

Words: 516 - Pages: 3

Programming

...- -[ ] http://blog.renren.com/blog/73603/740437492 » / [ ] 2011-07-18 10:47 | ( : ) http://coolshell.cn/articles/4990.html 6 12 programming An open letter to those who want to start id Mailper Python Web “ Build Your Programming Technical Skills “ ( ) Notes/ActiveX/COM/ADO/ATL/.NET …… Mailper Delphi/Power builder ” Lotus 5 3D TA 561 ” The architecture of w-ai.org –... Some updates and my first Engl... / 10 Unix/Linux Windows 1 Linux Web+ 1 Python/Ruby Web 2 iOS Android Windows Windows Windows Linux+ Windows 9 : csv ( log python csv, python open, python sys) 52 word count (sys, os, path) (python sqlite) print Google (phrase, domain, use reader to follow tech blogs) 2 ( Vim / Emacs / Notepad++ Source Insight ( ctag) Cool IDE) / / 3 Unix/Linux Shell windows man ls/chmod/chown/rm/find/ln/cat/mount/mkdir/tar/gzip … sed/awk/grep/tail/less/more … ps/top/lsof/netstat/kill/tcpdump/iptables/dd… /etc /var/log /proc linux vmware player Ubuntu 1 6 9/6/13 1:36 PM - -[ ] http://blog.renren.com/blog/73603/740437492 /Linux 4 Web Web HTML CSS HTML Firefox + Firebug Javascript HTML DOM Firefox + Firebug Apache PHP PHP PHP chrome Nginx HTML MySQL MySQL SQL http://www.stanford.edu/~ouster/cgi-bin/cs142-fall10/index.php ) javascript HTTP: The Definite Guide browsers) Cookie/Session jQuery 4 3-5 ExtJS + Ajax ( +JSON (proxy, gateway, Javascript box model chrome DOM......

Words: 807 - Pages: 4

Visual

...|Cas Visual | | | |[Tapez le sous-titre du document] | | | |[Sélectionnez la date] | | | |Romain | | |[Année] | Cadre de reference fondamental Vocation : Statut Visual est une coopérative depuis 40 ans , ce qui implique que pour les prises de décisions elle repose sur le principe démocratique "1 personne = 1 voix". Les membres-usagers et les salariés sont donc tous égaux en droit. Une enseigne Visual a alors une plus grand liberté de monoeuvre car dans l'ensemble "tout est proposé, très peu de choses sont imposée". Par exemple il n'y a pas de sanctions si toutes les règle d'appartenance établit par la coopérative ne sont pas appliquées (expeté les retard de payement). Avoir une enseigne donne l'accès à tous les services du groupe gratuitement. Le metier Visual regroupe des......

Words: 4519 - Pages: 19

Visual Programming

...TABLE OF CONTENT Introduction_________________________________________________________________________1 GROUP REPORT________________________________________________________________1 Visual Application Sketch___________________________________________________________1 Menu Form_____________________________________________________________________3 Menu Form Codes_____________________________________________________________3 LoginCreate Form_____________________________________________________________________4 Login TabPage 1___________________________________________________________4 Create A New Account TabPage 2_________________________________________________5 LoginCreate Form Codes_________________________________________________________5 Customer Form__________________________________________________________________7 Customer Form Codes___________________________________________________________8 Advertise Form_____________________________________________________________________9 Advertise Form Codes_______________________________________________________10 Payment From_____________________________________________________________________11 Payment Form Codes_______________________________________________________12 Staff_Login Form_____________________________________________________________________13 Staff_Login Form Codes_________________________________________________________14 Staff......

Words: 7080 - Pages: 29

Visual

...I have seen many paintings in my life, perhaps the most famous one was mona lisa by Leonardo Da Vinci which I have been seeing in cartoons and movies since my childhood, but that painting was very common so I decided to try something different for my visual essay. I was specifically interested in noir theme, and especially the era of 1930’s and 40’s when the Italian mafia had a major hold on New York being the most notorious criminals during the period. The most interesting feature of the noir theme is the stylized suits with the fedoras worn by most of the high class people at that time. I was searching the internet the other day when I came across this image. This is a painting by Edward Hopper, who was renowned due to his oil paintings at the time. And this painting describes a scene where there are three patrons and a waiter at a diner. There was a diner which inspired him to draw this painting at Greenwich Village, New York, and also the artist was born and residing there, due to which this particular diner was his choice of the subject. The artist’s main themes were to show American life during the 1940’s, while this painting was completed in 1942. In the above painting, there are no people walking around the streets, and this depicts that these are late night hours. The angle of the painting shows that the diner is located at the intersection of the streets. The patrons are wearing stylized suits and fedoras and the diner only sells cigars, which were very common......

Words: 273 - Pages: 2

Visual Basic Naming Programming

...Unit 2 Research Variable Naming Rules What are the variable naming rules of Visual Basic, Python, and Java? Visual Basic You must use a letter as the first character. You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name. Name can't exceed 255 characters in length. Generally, you shouldn't use any names that are the same as the functions, statements and methods in Visual Basic. You end up shadowing the same keywords in the language. To use an intrinsic language function, statement, or method that conflicts with an assigned name, you must explicitly identify it. Python Must begin with a letter (a - z, A - B) or underscore (_) Other characters can be letters, numbers or _ Case Sensitive Can be any (reasonable) length There are some reserved words, which you cannot use as a variable name because Python uses them for other things. Java All variable names must begin with a letter of the alphabet, an underscore, or ( _ ), or a dollar sign ($). The convention is to always use a letter of the alphabet. The dollar sign and the underscore are discouraged. After the first initial letter, variable names may also contain letters and the digits 0 to 9. No spaces or special characters are allowed. The name can be of any length. Uppercase characters are distinct from lowercase characters. Using ALL uppercase letters are primarily used to identify constant variables. Remember that variable names are......

Words: 411 - Pages: 2

Programming Languages

...Exploring Programming Languages Computers don't do anything without someone telling them what to do, much like the average teenager. To make the computer do something useful, you must give it instructions in either of the following two ways. When you write a program it tells a computer what to do, step by step, just as you would like when taking directions. When you buy a program that someone else has already written, it tells the computer what to do. Ultimately, to get a computer to do something useful, you (or somebody else) must write a program. A program does nothing more than tell the computer how to accept some type of input, manipulate that input, and spit it back out again in some form that humans find useful. Table 1 lists some common types of programs, the types of input that they accept, and the output that they produce. The five popular programming languages in the 1970’s were Pascal, C, SQL, KRL, and COMAL. Pascal is an influential imperative and procedural programming language, designed in 1968–1969 and published in 1970 by Niklaus Wirth. C (/ˈsiː/, as in the letter C) is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. SQL often referred to as Structured Query Language. KRL is a knowledge representation language, developed by Daniel G. Bobrow and Terry Winograd while at Xerox PARC and Stanford......

Words: 839 - Pages: 4

Visual

...Abstract This paper was written to describe the impact of visual and hearing impairments on student’s academic achievement to teachers and other educators. Having knowledge of these impairments allows the teacher to better serve students with these impairments in the classroom. Hearing and Visual Impairments Hearing and visual impairments have a major impact on a person’s development and academic achievement. Hearing and seeing are critical to speech and language development, communication, and learning. The earlier in a person’s life that they develop or have these impairments, the more serious the development of the person will be effected. In the same manner, the earlier that the problem is identified and intervention begun, the less serious the impact on that person’s development may be (American Speech Language Hearing Association, 2011). Hearing Impairments Hearing impairments are defined as the decreased ability to hear and differentiate sounds. This can range from mild hearing loss to total deafness (March of Dimes, 2010). Humans are able to hear sounds through the brains relationship with the ear. The outer ear absorbs sound waves that travel through the eardrum. These sound waves are then transferred to the middle ear before entering the cochlea. The cochlea is the main receptor organ for hearing and works with inner ear canals that assist with balance to hear and register sounds to the brain. Before an educator can differentiate or modify lesson plans they......

Words: 297 - Pages: 2

Programming

...Question: Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array. The specific problem you need to solve for the final project is: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. What is the required output? What is the necessary input? How you will obtain the required output from the given input? Clearly describe variable names and definitions. Include all necessary formulas and example calculations. 3. Display pseudocode of your overall design including the Main module and the order of the module, subprogram and function calls. 4. Create a Hierarchy chart for the overall program in raptor 5. detailed pseudocode for each module, subprogram and function. 6. Add pseudocode comments with all major functionality and most minor functionality commented 7. Show test plan covering all major functionality and most minor functionality. Multiple Input and expected output provided for most modules. SOLUTION: Analysis: For this program, user will be asked for name, age and state of their family members, one by one, until the user decides to stop entering this information. To achieve the given task (printing average family......

Words: 919 - Pages: 4

Programming

...flowcharts to describe a program’s structure. Use pseudocode to define a program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Answer: * Short Answer 1, 2, 3, and 4 on page 71 * Algorithm Workbench Review Questions 1 and 2 on page 71 * Programming Exercises Questions 1 and 4, starting on page 72 Required Resources Textbook Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Unit 2 Research Assignment 1: Researching Variable Naming Rules Learning Objectives and Outcomes Determine program input, processing, and output stages. Create the necessary flowcharts to describe a program’s structure. Use pseudocode to define a program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Use the Internet and the ITT Tech Virtual Library to research the following questions: What are the variable naming rules of Visual Basic, Python, and Java? List three similarities and differences in between the three programming languages. Required Resources Textbook ITT Tech Virtual Library: http://library.itt-tech.edu Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Labs Unit 2 Lab 2.1: Pseudocode Learning Objectives and Outcomes * Use pseudocode to define a program’s structure. *......

Words: 450 - Pages: 2

Programming

...Programming 1 - Semester 1, 2015 Assignment 1 Release Date: 27 / 02 /2015 Total raw marks: 60 Assignment weight: 6% NOTE: This assignment is to be undertaken individually—no group work is permitted. Background information For this assignment you are to complete a partially completed menu-driven, Java console application, which allows the user to select one of four options:     Display Time and Date Swim Fitness Summary Calculator Sentence Analyser Exit The incomplete code solution (in the source file called MenuDrivenProgram.java) is in the same Assignment 1 folder, available via myRMIT. The partially completed program already has code to display the menu. You should study the code and then compile and execute it without implementing the following options. This will allow you to understand the flow of execution of the program, as is. a) Once the processing for the selected option has been completed the program should return to the menu (that is, the program should not terminate). b) You do not need to handle runtime errors of any kind for this assignment and you may assume that the user will always enter input in the correct format. This applies both to the menu itself and the processing of the menu options. Program Features Menu Option A - Display Time and Date (10 marks) The program should retrieve the current time and date from the system and then display it in the format shown......

Words: 1404 - Pages: 6