Linguagem Programação Estruturada Prof. Dr. Chau S. Shia



Similar documents
Classe AGI - PHP 5.x

Introduction to Java

El Dorado Union High School District Educational Services

AP Computer Science Java Subset

J a v a Quiz (Unit 3, Test 0 Practice)

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

EUROCALCULADORA. Option Compare Database. Private Sub Comando4_Click() [pesetas] = [euros] * End Sub

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

C Coding Style Guide. Technotes, HowTo Series. 1 About the C# Coding Style Guide. 2 File Organization. Version 0.3. Contents

Introduction to Computer Programming, Spring Term 2014 Practice Assignment 3 Discussion

MC514 Sistemas Operacionais: Teoria e Prática 1s2006. Gerenciamento de Entrada e Saída

The C Programming Language course syllabus associate level

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin

Android Bootcamp. Elaborado (com adaptações) a partir dos tutoriais:

An Incomplete C++ Primer. University of Wyoming MA 5310

Scanner sc = new Scanner(System.in); // scanner for the keyboard. Scanner sc = new Scanner(System.in); // scanner for the keyboard

C++ Programming Language

Pemrograman Dasar. Basic Elements Of Java

1 a QUESTÃO Valor: 1,0

AWS Directory Service. AD Connector Administration Guide Version 1.0

Tema: Encriptación por Transposición

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013

Introduction to Visual C++.NET Programming. Using.NET Environment

Boletim Técnico. Esta implementação consiste em atender a legislação do intercâmbio eletrônico na versão 4.0 adotado pela Unimed do Brasil.

CSE 8B Midterm Fall 2015

How To Create A Data Gateway On A Microsoft Powerbook On A Pc Or Macode (For Microsoft) On A Macode 2.5 (For A Microode) On An Ipad Or Macroode ( For A Microos

AWS Directory Service. Administration Guide Version 1.0

Sources: On the Web: Slides will be available on:

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

Part I. Multiple Choice Questions (2 points each):

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007

NADABAS. Report from a short term mission to the National Statistical Institute of Mozambique, Maputo Mozambique April 2012

Java Crash Course Part I

Outline. Conditional Statements. Logical Data in C. Logical Expressions. Relational Examples. Relational Operators

Who / where / what / when / whose / how old / how many / how much / how / why a. WHOSE T-shirt is white? Telma t-shirt is white.

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

Chapter 13 Storage classes

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Test #4 November 20, True or False (2 points each)

Keil C51 Cross Compiler

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

Chapter 2 Introduction to Java programming

Implementation Aspects of OO-Languages

1. Writing Simple Classes:

Phys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

Stacks. Linear data structures

Apéndice C: Código Fuente del Programa DBConnection.java

Fundamentals of Programming and Software Development Lesson Objectives

Arrays in Java. Working with Arrays

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

Introduction to Object-Oriented Programming

Object Oriented Software Design

SISTEMA MULTI-AGENTE COMPOSTO POR VÁRIOS AGENTES QUE COMUNICAM ATRAVÉS DUMA CENTRAL Exemplo de Resolução

Example of a Java program

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

Introduction to Java Lecture Notes. Ryan Dougherty

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit.

Contents. 9-1 Copyright (c) N. Afshartous

e ag u g an L g ter lvin v E ram Neal G g ro va P Ja

Object Oriented Software Design


Web Services with ASP.NET. Asst. Prof. Dr. Kanda Saikaew Department of Computer Engineering Khon Kaen University

Computer Programming I

Installing Java (Windows) and Writing your First Program

Assignment No.3. /*-- Program for addition of two numbers using C++ --*/

This tutorial has been prepared for the beginners to help them understand basics of c# Programming.

ECE 122. Engineering Problem Solving with Java

Monitoring of Tritium release at PTC.

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Prof. Edwar Saliba Júnior

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

13 melhores extensões Magento melhorar o SEO da sua loja

System.out.println("\nEnter Product Number 1-5 (0 to stop and view summary) :

COS 217: Introduction to Programming Systems

A- ENCONTRE no texto, palavras ou frases que correspondam aos significados abaixo: (0.2 cada)

Java Cheatsheet. Tim Coppieters Laure Philips Elisa Gonzalez Boix

Representação de Caracteres

Section 6 Spring 2013

Online Products. Maximize your participation with the. The World s Leading Events Organizer

Man/days atribuition for GHG verification

Arrays. Atul Prakash Readings: Chapter 10, Downey Sun s Java tutorial on Arrays:

Free access to Teller24, our automated telephone system. A lot of other financial institutions offer free checking with a lot of strings.

Introduction to Lex. General Description Input file Output file How matching is done Regular expressions Local names Using Lex

Reach 4 million Unity developers

Bucle for_in. Sintaxis: Bucles for_in con listas. def assessment(grade_list): """ Computes the average of a list of grades

2009 Tutorial (DB4O and Visual Studio 2008 Express)

Konzepte objektorientierter Programmierung

Profissionais que pretendam desempenhar funções de Administrador de software como serviço (SaaS) ou de aplicações cloud.

Java Interview Questions and Answers

Basic Java Syntax. Program Structure

Comp151. Definitions & Declarations

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

Two-Dimensional Arrays Summer 2010 Margaret Reid-Miller

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer

Using SQL Server Management Studio

Output: struct treenode{ int data; struct treenode *left, *right; } struct treenode *tree_ptr;

Introduction to Java. CS 3: Computer Programming in Java

Install Java Development Kit (JDK) 1.8

Transcription:

1-while int i = 1; while (i <= 5) Console.WriteLine("contador i =" +i); i++; 2-Switch int n=0; Console.Write("Digite uma opção: "); n = int.parse(console.readline()); switch (n) case 0: Console.WriteLine("n igual a 0"); case 1: ; Console.WriteLine("n igual a 1"); case 2: Console.WriteLine("n igual a 2"); default: Console.WriteLine("Não existe opção"); ;

3-Case String string s=""; Console.WriteLine("Digite um texto.."); s = switch(s) case "teste": Console.WriteLine("teste"); case "teste 1": Console.WriteLine("teste 1"); default: Console.WriteLine("Não existe a palavra"); ; 4-Case CHAR string s = "aabbccx"; //Console.WriteLine("Digite um caractere..."); //s = for (int i=0; i < s.length;i++ ) switch(s[i]) case 'a': case'a': Console.WriteLine("s igual a a ou A");

case 'b': case 'B': Console.WriteLine("s igual a b ou B"); default: Console.WriteLine("Não existe o caracter"); ; ; 5-For int j = 0; for (; j < 10;j++ ) Console.WriteLine(j); 6-Foreach int [] A=new int[]9,8,7,6,5,4,3,2,1; foreach (int i in A) Console.WriteLine("O valor de i é 0",i);

7-Do...While int i = 0; do Console.WriteLine(i.ToString() + " Ainda é menor que 10"); while (i++ < 10); 8-While int i = 0; while (i < 10) Console.WriteLine(i.ToString() + "Ainda é menor que 10"); i++; ; 9-Break

for (int i = 0; ; i++) if (i == 30) Console.WriteLine(i.ToString() + " que 30"); ; Ainda é menor 10-Continue sing System; for (int i = 0; i < 30; i++) if (i % 2 == 1) continue; Console.WriteLine(i.ToString() + " É um numero impar"); ; 11-Métodos int x = 10;

int n = 20; float r=divide(n,x); Console.WriteLine("O resultado de n/x = "+r.tostring()); Console.WriteLine("O resultado de n/x = "+(Divide(n,x)).ToString()); static float Divide(float num, float div) if (div == 0) return 0; return num / div; 12-Métodos que recebem Parâmetrosa por Referência int dia = 0; int mes = 3; Console.Write("Digite o mês: "); UltimoDiaDoMes(ref dia, 3); Console.WriteLine("O ultimo dia do mes " + mes.tostring() + "é " +dia.tostring() ); static void UltimoDiaDoMes(ref int ndata, int nmes) switch (nmes) case 1: case 3: case 5: case 7: case 10: case 12: ndata = 31; case 2: ndata = 28; default: ndata=30;