0% found this document useful (0 votes)
149 views

Computer Fundamentals and Programming Cover Page

The document appears to be a lab report submitted by Muhammad Umair for a Computer Fundamentals and Programming course. It includes 6 activities covering basic C programming concepts like input/output, variables, operators, formatting output. The lab report demonstrates Umair's understanding of these basic programming concepts through the programs written for each activity.

Uploaded by

Dar Akht
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

Computer Fundamentals and Programming Cover Page

The document appears to be a lab report submitted by Muhammad Umair for a Computer Fundamentals and Programming course. It includes 6 activities covering basic C programming concepts like input/output, variables, operators, formatting output. The lab report demonstrates Umair's understanding of these basic programming concepts through the programs written for each activity.

Uploaded by

Dar Akht
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

.

Computer Fundamentals and


Programming (Lab)
Experiment 01:

Name: Muhammad Umair


Session: BS ME 20-24

Submitted to: Mr. Mazhar Hussain

Submission Date:
Activity 01

// Lab Report 01.c

#include <stdio.h>

int main( void )

printf( "Muhammad Umair!\n" );

} // end function main


Activity 02

The output of this activity is predicted as

A=20

B=30

C=50

PROGRAM

#include<stdio.h>

#include<conio.h>

int main (void)

int a=10,b=20,c=30;

printf("Value of A = %d, value of B=%d",a,b);

printf("\nB+C=%d",a+b);

a=b;

b=c;

c=a+b;

printf("\nThe values of a,b and c are\n a= %d \nb=%d \nc=%d",a,b,c);

getch();

COMPARISON

Both the answers are samne


Activity 03(a)

#include <stdio.h>

#include <conio.h>

int main(void)

{int a,b,c;

printf("Enter the value of product");

scanf("%d",&a);

b=0.9*a;

c=0.9*b;

printf("\nThe value of product after 2 years=%d",c);

getch();

}
Activity 03(b)

#include<stdio.h>

#include<conio.h>

int main(void)

{ int A,B,C;

int D,E;

printf("Enter the value numbers A,b,C:");

scanf("%d,%d,%d",&A,&B,&C);

D=A+B+C;

E=D/3;

printf("the sum of A,B,C=%d",D);

printf("the average of A,B,C=%d",E);

getch();

}
ACTIVITY 03(C)

#include<stdio.h>

#include<conio.h>

int main(void)

int A=45678;

int B,C;

B=0.2*A;

C=0.1*B;

printf("the value of 10%% of 20%% of 45678 =%d",C);

getch();

}
ACTIVITY 04

#include<stdio.h>

#include<conio.h>

int main(void)

printf("Name\t:Muhammad Umair\nRoll No\t:36\nSession\t:20-24");

getch();

}
Activity 05(a)

#include <stdio.h>

#include <conio.h>

int main(void)

int a,b,c;

a=10;

b=40;

c=a+b;

printf(“The sum of a and b = %d”, c);

getch();

}
Activity 05(b)

#include <stdio.h>

#include <conio.h>

main(void)

int a,b,c;

a=10;

b=20;

c=30;

printf(" A = %d",a);

printf(" B = %d",b);

printf(" C = %d ",c);

getch();

}
Activity 05(c)

#include <stdio.h>

#include <conio.h>

main(void)

int a,b,c;

a=10;

b=20;

c=30;

printf("A = %d\n B = %d\n C = %d",a,b,c);

getch();

}
Activity 06

#include<stdio.h>

int main(void)

{ int name,degree,matric,inter,graduation,master,workexperience,references;

int city;

printf(" NAME : \t\t\t");

scanf("%d",&name);

printf(" Email : [email protected]\n");

printf(" City : Sargodha\n");

printf("\nEducation : \n");

printf(" Degree : BS Mechanical Engineering\n");

printf(" Degree of Matriculation : Fazaia Modal Inter College Mushaf Sargodha\n");

printf(" Degree of Intermediate : Punjab College\n");

printf(" Degree of Graduation : PIEAS University Islamabad \n");

printf("Work Experience : I am very intellectual student. I have been working on


cryptocurrency for last 14 months. : \n");

printf("Reference: PIEAS;\n");

getchar();

return 0;}

You might also like