ICS Lab File - ICSPracticalLabFile TITLE NAME S/O: CLASS...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ICS Practical Lab File TITLE PROGRAMS FILE OF ICS NAME ABDUL GHANI SHAHZAIB S/O: MOHAMMED ARIF CLASS BSCS-I SECTION A ROLL # 01 BATCH 2008-2012 SUBJECT INTRODUCTION TO COMPUTER SCIENCE TEACHER MISS QURATTAILAIN DEPARTMENTCOMPUTER SCIENCE DATE 05-05-08 UNIVERSITY KARACHI UNIVERSITY Department of Computer Science                                                                                               Page # 1 University of Karachi.                                                                                        
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ICS Practical Lab File Object # 01: Write a program to print your name . Algorithm:- 1. Output “Abdul “Ghani Shahzaib”. 2. Stop. C++ Code:- #include <stdio.h> #include <conio.h> void main(void) {   clrscr();   printf("Abdul Ghani Shahzaib");   getch(); } Result:- Abdul Ghani Shahzaib. Department of Computer Science                                                                                               Page # 2 University of Karachi.                                                                                        
Background image of page 2
ICS Practical Lab File   Object # 02: Write a program takes input a number and prints which the number . Algorithm:- 1. Input a 2. Output a 3. Stop. C++ Code:- #include <stdio.h> #include <conio.h> void main(void) {   clrscr();   int n;   printf("\nEnter a Number-> ");   scanf("%d", &n);   printf("\nThe entered number is %d", n);   getch(); } Result:- Department of Computer Science                                                                                               Page # 3 University of Karachi.                                                                                        
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ICS Practical Lab File Enter a Number-> 36 The entered number is 36.   Object # 03: Write a program which takes input a number and prints square of that number. Algorithm:- 1. Input a 2. s=a*a 3. Output a 4. Stop. C++ Code:- #include <stdio.h> #include <conio.h> void main(void) {   clrscr();   int n,s;   printf("\nEnter a number-> ");   scanf("%d", &n);   s = n * n Department of Computer Science                                                                                               Page # 4 University of Karachi.                                                                                        
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 20

ICS Lab File - ICSPracticalLabFile TITLE NAME S/O: CLASS...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online