Name: Muhammad Hassan VU-ID: BC Version: Office 2007

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

Functions in C++. Functions  Groups a number of program statements into a unit & gives it a name.  Is a complete and independent program.  Divides.
PASSING PARAMETERS 1. 2 Parameter Passing (by Value) Parameters Formal Parameters – parameters listed in the header of the function Variables used within.
1 9/24/07CS150 Introduction to Computer Science 1 Relational Operators and the If Statement.
1 9/28/07CS150 Introduction to Computer Science 1 Loops section 5.2, 5.4, 5.7.
1 10/20/08CS150 Introduction to Computer Science 1 do/while and Nested Loops Section 5.5 & 5.11.
1 10/11/06CS150 Introduction to Computer Science 1 do/while and Nested Loops.
CS150 Introduction to Computer Science 1
1 September 6, 2005CS150 Introduction to Computer Science I What Actions Do We Have Part 1 CS150 Introduction to Computer Science I.
1 10/9/06CS150 Introduction to Computer Science 1 for Loops.
Compound Operators 03/07/11. More Operators, First Section 4.4.
1 CS150 Introduction to Computer Science 1 Relational Operators and the If Statement 9/22/08.
C++ programming I Lab#3 Control Statements Instructor: Eng. Ruba A. Salamah Tuseday: 17/10/2010.
Programming is instructing a computer to perform a task for you with the help of a programming language.
CS 31 Discussion, Week 4 Faisal Alquaddoomi, Office Hours: BH 2432, MW 4:30-6:30pm, F 12:30-1:30pm (today)
Chapter 05 (Part V) Control Statements: Part II. Nested For-Structures Consider the following codes: for (int i=0; i
CS1201: Programming Language 2 Recursion By: Nouf Almunyif.
Tutorial 1 Chapter 1 and 2 Exercises1. 2 Exercise 1 Which of the following identifiers are: main 1.invalid identifiers 2.valid identifiers and why? double.
Current Assignments Homework 3 is due tonight. Iteration and basic functions. Exam 1 on Monday.
Chapter 6.  Control Structures are statements that are used to perform repetitive tasks and to make decisions within a program. Loop repeats a sequence.
Review the following : Flowcharting Variable declarations Output Input Arithmetic Calculations Conditional Statements Loops.
COMP102 – Programming Fundamentals I LA2B (Mon 5-7pm) LA2E (Fri 3-5pm) LA2F (Fri 5-7pm) TA: Jackie Lo.
Array & Matrix Selected topics. 1. It will compare two adjacent elements, if second element is smaller than the first then it will swap them, if we wanted.
1 Lecture 17 Operator Overloading. 2 Introduction A number of predefined operators can be applied to the built- in standard types. These operators can.
11/10/2016CS150 Introduction to Computer Science 1 Last Time  We covered “for” loops.
Function User defined function is a code segment (block) that perform an specific action. Function Definition: Function Definition: Return_DT F_name (
CSC1201: Programming Language 2 1 Functions. 2 Function declaration: return_type FuncName( Type arg1, Type arg2,….. Type argN) { function body } A program.
 Memory setup  Pointer declaration  Address operator  Indirection  Printing addresses or pointers.
Lecture 20 Polymorphism. Introduction General meaning ; the ability to take on different forms. Programming language term: –Allows an entity to take a.
Intro. to Computer Programming Eng. Nehal A. Mohamed Spring Semester-2016.
C++ CODES PART#04 1 COPY ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT.
Fucntions in C++ Malik Jahan Khan
Two Dimensional Array Mr. Jacobs.
CS150 Introduction to Computer Science 1
Intro to Programming Week # 4 Switch Statement Lecture # 7
Programming Fundamentals
ASSIGNMENT NO.-2.
Programming fundamentals 2 Chapter 2:Function
Ambiguity Resolution in Inheritance
Intro to Programming Week # 3 If-else Statement Lecture # 6
CSC1201: Programming Language 2
CS1201: Programming Language 2
Unary Operators ++ and --
Screen output // Definition and use of variables
Dynamic Memory Copy Challenge
Lecture 12 Oct 16, 02.
Cs212: DataStructures Computer Science Department Lab 3 : Recursion.
COPY ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT
CS150 Introduction to Computer Science 1
Introduction to Algorithms and Programming COMP151
If Statements.
Dr. Khizar Hayat Associate Prof. of Computer Science
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
CS1201: Programming Language 2
CS150 Introduction to Computer Science 1
CSC1201: Programming Language 2
Introduction to Algorithms and Programming
Using string type variables
Dynamic Memory Copy Challenge
Dr. Khizar Hayat Associate Prof. of Computer Science
CPP Programming Language
TOPIC: FUNCTION OVERLOADING
Introduction to Algorithms and Programming COMP151
COPY ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT
Programming Fundamental
Functions Chapter No. 5.
Programming Fundamental-1
Programming Fundamental-1
Presentation transcript:

Name: Muhammad Hassan VU-ID: BC140401205 Version: Office 2007 Cs201 (1st )assignment Name: Muhammad Hassan VU-ID: BC140401205 Version: Office 2007

Programe code : #include<iostream.h> main(){ int a,b,sum; cout<<" ----------- My VU ID: BC140401205 ------------"<<endl<<endl; cout<<"Enter first number:"; cin>>a; cout<<"Enter second number:"; cin>>b; sum=a+b; cout<<endl; cout<<"Sum of numbers:"<<sum<<endl<<endl; cout<<"-----------------------------------------"<<endl; system("pause"); }

Screen shoot of output :