0% found this document useful (0 votes)
34 views5 pages

Lab Manual 3

This document contains 4 C++ code examples written by Muhammad Waqas with registration number 23 CS 83 for their Programming Fundamentals lab manual. The code examples calculate age in months, total and average marks for 3 subjects, volume of a cylinder, and conversion from Celsius to Fahrenheit. Each example is followed by an output section that is left blank.

Uploaded by

waqasaps001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

Lab Manual 3

This document contains 4 C++ code examples written by Muhammad Waqas with registration number 23 CS 83 for their Programming Fundamentals lab manual. The code examples calculate age in months, total and average marks for 3 subjects, volume of a cylinder, and conversion from Celsius to Fahrenheit. Each example is followed by an output section that is left blank.

Uploaded by

waqasaps001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

NAME:MUHAMMAD WAQAS

REG NO:23 CS 83

PROGRAMMING FUNDAMENTALS
LAB MANUAL :03

CODE 1
#include<iostream>

using namespace std;

int main()

int a,m;

cout<<"enter your age"<<endl;


cin>>a;

m=a*12;

cout<<"your age in months:"<<m;

OUTPUT

CODE :2
#include<iostream>

using namespace std;

int main()

int m1,m2,m3,avg,total;
cout<<"Enter marks of programming fundamentals digital logic design and logic circuit";

cin>>m1>>m2>>m3;

total=m1+m2+m2;

cout<<"your total marks = "<<total<<endl;

avg=total/3;

cout<<"your average = "<<avg;

OUTPUT

CODE:3
#include<iostream>

using namespace std;

int main()
{

float vol,h,r,pi=3.14;

cout<<"Enter radius";

cin>>r;

cout<<"Enter height";

cin>>h;

vol=pi*h*r*r;

cout<<"volume is "<<vol;

OUTPUT

CODE:4
#include<iostream>

using namespace std;


int main()

int celcius,farenheit;

cout<<"enter temperature in celcius";

cin>>celcius;

farenheit=(celcius*9/5)+273;

cout<<"your temperature in farenheit is "<<farenheit;

output

You might also like