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

Info icon This 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.                                                                                        
Image of page 1

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

View Full Document Right 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.                                                                                        
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.                                                                                        
Image of page 3

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

View Full Document Right 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.                                                                                        
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '10
  • SaleemElahi
  • Computer Science, Input/output, UNIVERSITY OF KARACHI, ICS Practical Lab, Practical Lab File, Science                                                                                               Page

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern