PF Section A Tasks Programming Fundamentals
Datatypes and their usage
Q1. Write a program in C++ to take input integer type from the user and print it on the console?
Q2. Write a program in C++ to take input character type from the user and print it on the console?
Q3. Write a program in C++ to input double point value from the user and print it on the console?
Q4. Write a program in C++ to input the bool type from the user and print it on the console?
Q5. Write a program in C++ to take marks of four subjects, for example, English, Urdu, math, and Islamiyat from the user and print in on the console?
Q6. Write a program in C++ to take two values and print their sum on the console?
Q7. Write a program in C++ to take two values and print their Multiply on the console?
Q8. Write a program in C++ to take two values and print their Division on the console?
Q9. Write a program in C++ to take two values and print their Mod on the console?
for Help:
#include
ReplyDeleteusing namespace std;
int main()
{
bool a=2+3>0;
cout<>a;
system("pause");
return 0;
}
Q6.#include
ReplyDeleteusing namespace std;
int main()
{
int a;
int b;
cout <<"Enter number";
cin>>a>>b;
cout<<"the result is" <<a+b;
system("pause");
return 0;
}
good work
DeleteQ1.
ReplyDelete#include
using namespace std;
int main()
{
int number=888;
cout<<"Number from the user"<<"\n";
cin>>number;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS Section A1.
CMS NO.406084.
Q2.#include
ReplyDeleteusing namespace std;
char main()
{
char CR;
cout<<"Character of the user";
cin>>CR;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class :BSCS sectionA1.
CMS NO;406084.
Q3.
ReplyDelete#include
using namespace std;
int main()
{
double a=2.4;
double b=3.2;
cout<>a>>b;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS section A1.
CMS NO.406084.
#include
ReplyDeleteusing namespace std;
int main()
{
bool a;
cout << "write aexpression " << "\n";
cin >> a;
cout << "answer = " << a;
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
char u;
cout << "write a character = ";
cin >> u ;
cout << "your character is = " << u ;
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
double mynum;
cout << " write a number " <<"\n";
cin >> mynum;
cout << "your number is " << mynum;
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
int num;
cout << "write a integer" << "\n";
cin >> num;
cout << "integer = " << num
<< "\n";
return 0;
}
Q4.
ReplyDelete#include
using namespace std;
int main()
{
bool a=2+3>0;
cout<>a;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS SectionA1
CMS NO.406084
Q5.
ReplyDelete#include
using namespace std;
int main()
{
int english;
int math;
int urdu;
int islamiyat;
cout<<"Marks of the English"<>english;
cout<<"Marks of the Math"<>math;
cout<<"Marks of Urdu"<>urdu;
cout<<"Marks of Islamiyat"<>islamiyat;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS Section A1.
CMS NO.406084.
Q6.#include
ReplyDeleteusing namespace std;
int main()
{
int a;
int b;
cout <<"Enter number";
cin>>a>>b;
cout<<"the result is" <<a+b;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS SectionA1.
CMS NO:406084.
Q7.
ReplyDelete#include;
using namespace std;
int main()
{
int a;
int b;
cout <<"Enter any number";
cin>>a>>b;
cout <<"The result is"<<a*b;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS sectionA1.
CMS NO.406084.
#include
ReplyDeleteusing namespace std;
int main()
{
int a;
int b;
cout <<"Enter any number";
cin>>a>>b;
cout <<"the reuslt is" <<a/b;
system("pause");
return 0;
}
Name:Muhammad Wasif Nazir.
Class:BSCS section A1.
CMS NO.406084.
This comment has been removed by the author.
ReplyDeleteQ # 1,
ReplyDelete#include
using namespace std;
int main()
{
int number= 0
cout<<" enter an integer"<>number;
system ("pause");
Return 0;
}
Name: Ahsan Waheed
Section:A
Cms # : 406147
Q # 2,
ReplyDelete#include
using namespace std;
char main()
{
char a;
cout<<"enter your character"<>a;
system ("pause");
Return 0;
}
Q # 4,
#include
using namespace std;
int main()
{
bool a=2+3>1;
cout<>a;
system ("pause");
Return 0;
}
Name : Ahsan Waheed
Section : A
Cms # : 406147
Q2#include
ReplyDeleteusing namespace std;
char main()
{
char a;
cout<<"Name of character"<>a;
system ("pause");
return 0;
}
muhammad sheraz A1 (405646) Q1
ReplyDelete#include
using namespace std;
int main()
{
int p;
cout<<"show my number"<>p;
system("pause");
return 0;
}
well done sheraz
Deletemuhammad sheraz A1 (405646) Q2
ReplyDelete#include
using namespace std;
char main()
{
double g;
cout<<"enter the character"<>g;
cout<<g;
system("pause");
return 0;
}
muhammad sheraz A1 (405646) Q3
ReplyDelete#include
using namespace std;
char main()
{
double g;
cout<<"enter the character"<>g;
cout<<g;
system("pause");
return 0;
}
muhammad sheraz A1 (405646) Q4
ReplyDelete#include
using namespace std;
bool main()
{
bool a=4>6;
cout<<a<<endl;
system("pause");
}
muhammad sheraz A1 (405646) Q5
ReplyDelete#include
using namespace std;
int main()
{
int eng;
int math;
int urdu;
int islamiyat;
cout<<"enter your english marks"<>eng;
cout<>math;
cout<>urdu;
cout<>islamiyat;
cout<<islamiyat;
system("pause");
return 0;
}
muhammad sheraz A1 (405646) Q6
ReplyDelete#include
using namespace std;
int a;
int b;
int answer;
void main()
{
cout<<"ENTER THE FIRST NUMBER"<>a;
cout<<"ENTER THE SECOUND NUMBER"<>b;
answer=a+b;
cout<<"THE SUM OF NUMBER ="<<endl;
system("pause");
}
muhammad sheraz A1 (405646) Q7
ReplyDelete#include
using namespace std;
int a;
int b;
int answer;
void main()
{
cout<<"ENTER THE FIRST NUMBER"<>a;
cout<<"ENTER THE SECOUND NUMBER"<>b;
answer=a*b;
cout<<"THE MULTIPLE OF TWO NUMBER"<<endl;
system("pause");
}
muhammad sheraz A1 (405646) Q8
ReplyDelete#include
using namespace std;
int a;
int b;
int answer;
void main()
{
cout<<"ENTER THE FIRST NUMBER"<>a;
cout<<"ENTER THE SECOUND NUMBER"<>b;
answer=a/b;
cout<<"THE DEVISION OF THE NUMBER";
system("pause");
}
#include
ReplyDeleteusing namespace std;
int main()
{
bool a=1>0;
cout<>a;
system ("pause");
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
bool a=1>0;
cout<>a;
system ("pause");
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
cout<<"my name is aqeel ejaz"<<endl;
cout<<"my father name is ejz"<<endl;
cout<< "cms number is 405875"<<endl;
system ("pause");
return 0;
}
#include
ReplyDeleteusing namespace std ;
int main()
{
double a=1.2;
double b=2.2;
cout<>a>>b;
system ("pause");
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
char u;
cout<<"write a character = ";
cin>>u;
cout<<"your character is ="<< u ;
return 0;
}
ReplyDeleteQUESTION NO 1;;DATATYPE FROM PEEPGRAME?
Write a programme in c++ to take integers type?
#include
using namespace std;
int main()
{
int number=786;
cout<<"Any integers"<>number;
system ("pause");
return 0;
}
QUESTION NO 2;;
ReplyDeleteWrite a programme in c++ to take double type?
#include
using namespace std;
int main()
{
double a=1.1;
double b=2.3;
cout<>a>>b;
system ("pause");
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
int english;
int urdu;
int math;
int islamiyt;
cout << "enter your marks in english " << "\n";
cin >> english;
cout << "your number in english is " << english << "\n";
cout << "enter your marks in urdu " << "\n";
cin >> urdu;
cout << "your number in urdu is " << urdu << "\n";;
cout << "enter your marks in math " << "\n";
cin >> math;
cout << "your number in math is " << math << "\n";;
cout << "enter your marks in islamiyt " << "\n";
cin >> islamiyt;
cout << "your marks in islamiyt is " << islamiyt << "\n";;
return 0;
}
ReplyDeleteQUESTION NO 3;;
Write a programe in c++ to take bool?
(a),#include
using namespace std;
int main()
{
bool a=0>1;
cout<>a;
system ("pause");
return 0;
}
(b),#include
using namespace std;
int main()
{
bool a=0<1;
cout<>a;
system ("pause");
return 0;
#include
ReplyDeleteusing namespace std;
int main()
{
int a, b,sum;
cout << "enter two value to be added ";
cin >> a;
cin >> b;
sum = a + b;
cout << "result=" << sum;
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
int a, b, multiply;
cout << "write two numbers to be divide " << "\n";
cin >> a >> b;
multiply = a * b;
cout << "result= " << multiply;
return 0;
}
Question no 6;product of two numbers
ReplyDelete#include
using namespace std;
int main()
{
int a;
int b;
cout<<"a+b"<>a,b;
system ("pause");
return 0;
}
not product their sum
Delete#include
ReplyDeleteusing namespace std;
int main()
{
int a, b, division;
cout << "write two number to be divide " << "\n";
cin >> a >> b;
division = a / b;
cout << "result= " << division;
return 0;
}
#include
ReplyDeleteusing namespace std;
int main()
{
int a, b, mod;
cout << "enter value " << "\n";
cin >> a >> b;
mod = a % b;
cout << "result " << mod;
return 0;
}
https://docs.google.com/document/d/1N_YTcl6k5NdWohlaehgY71nj508jrt0SB3xawh3aWnk/edit?usp=sharing
ReplyDeleteQ # 3,
ReplyDelete# include
using namespace std;
int main()
{
double a=0;
double b=0;
cout<<"enter your value""<>a>>b;
system ("pause");
Return 0;
}
Q # 6,
# include
using namespace std;
int main()
{
int a=0;
int b=0;
int sum=0;
cout<<"Enter 2 values"<>a>>b;
sum=a+b;
cout<<"sum"<<endl;
System ("pause");
Return 0;
}
well done everyone i have checked all the Comments all who are not taking this serious will face the consequences please be serious
ReplyDelete#include
ReplyDeleteusing namespace std;
void main()
{
int a,b;
a=5,b=25;
cout<<"a=5 and b=25";
cout<<"a+b="<
using namespace std;
void main()
{
char a;
cout<<"Enter a character";
cin>>a;
cout<<"you Enter"<
using namespace std;
void main()
{
char a;
cout<<"Enter a character";
cin>>a;
cout<<"you Enter"<
using namespace std;
void main()
{
int eng,com,phy,math,sum;
cout<<"Enter your English marks";
cin>>eng;
cout<<"Enter your computer marks";
cin>>com;
cout<<"Enter your physics marks";
cin>>phy;
cout<<"Enter your Math marks";
cin>>math;
cout<<"Your English marks is"<
using namespace std;
void main()
{
int a,b;
a=5,b=25;
cout<<"a=5 and b=25";
cout<<"a+b="<<a+b<<endl;
cout<<"a-b="<<a-b<<endl;
cout<<"a/b="<<a/b<<endl;
system("pause");
}
Aurang Zaib 405640
shabash aurangzaib khan
DeleteQ1. Write a program in C++ to take input integer type from the user and print it on the console?
ReplyDelete#include
using namespace std;
int main()
{
int a;
cout << "Enter an integer =";
cin >> a;
cout << "The integer is = "<
using namespace std;
int main()
{
char a;
cout << "Enter any character = ";
cin >> a;
cout<<"your value is = "<< a;
return 0;
}
Q3. Write a program in C++ to input double point value from the user and print it on the console?
#include
using namespace std;
int main()
{
double a;
cout << "Enter any num = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q4. Write a program in C++ to input the bool type from the user and print it on the console?
#include
using namespace std;
int main()
{
bool a;
cout << "Enter any logic = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q5. Write a program in C++ to take marks of four subjects, for example, English, Urdu, math, and Islamiyat from the user and print in on the console?
#include
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
cout << "Enter the english marks = ";
cin >> a;
cout <<"your marks in english are = " << a << "\n";
cout << "Enter the math marks = ";
cin >> b;
cout << "your marks in math are = " << b << "\n";
cout << "Enter the urdu marks = ";
cin >> c;
cout << "your marks in urdu are = " << c << "\n";
cout << "Enter the islamiat marks = ";
cin >> d;
cout << "your marks in islamiat are = " << d << "\n";
return 0;
}
Q6. Write a program in C++ to take two values and print their sum on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "sum = "<
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Product is = " << a * b << "\n";
return 0;
}
Q8. Write a program in C++ to take two values and print their Division on the console?
#include
using namespace std;
int main()
{
float a = 0;
float b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "divide = " << a / b << "\n";
return 0;
}
Q9. Write a program in C++ to take two values and print their Mod on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Reminder is = " << a % b << "\n";
return 0;
}
Q1. Write a program in C++ to take input integer type from the user and print it on the console?
ReplyDelete#include
using namespace std;
int main()
{
int a;
cout << "Enter an integer =";
cin >> a;
cout << "The integer is = "<
using namespace std;
int main()
{
char a;
cout << "Enter any character = ";
cin >> a;
cout<<"your value is = "<< a;
return 0;
}
Q3. Write a program in C++ to input double point value from the user and print it on the console?
#include
using namespace std;
int main()
{
double a;
cout << "Enter any num = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q4. Write a program in C++ to input the bool type from the user and print it on the console?
#include
using namespace std;
int main()
{
bool a;
cout << "Enter any logic = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q5. Write a program in C++ to take marks of four subjects, for example, English, Urdu, math, and Islamiyat from the user and print in on the console?
#include
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
cout << "Enter the english marks = ";
cin >> a;
cout <<"your marks in english are = " << a << "\n";
cout << "Enter the math marks = ";
cin >> b;
cout << "your marks in math are = " << b << "\n";
cout << "Enter the urdu marks = ";
cin >> c;
cout << "your marks in urdu are = " << c << "\n";
cout << "Enter the islamiat marks = ";
cin >> d;
cout << "your marks in islamiat are = " << d << "\n";
return 0;
}
Q6. Write a program in C++ to take two values and print their sum on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "sum = "<
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Product is = " << a * b << "\n";
return 0;
}
Q8. Write a program in C++ to take two values and print their Division on the console?
#include
using namespace std;
int main()
{
float a = 0;
float b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "divide = " << a / b << "\n";
return 0;
}
Q9. Write a program in C++ to take two values and print their Mod on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Reminder is = " << a % b << "\n";
return 0;
}
Faizan Ahmed
cms= 406201
Q1. Write a program in C++ to take input integer type from the user and print it on the console?
ReplyDelete#include
using namespace std;
int main()
{
int a;
cout << "Enter an integer =";
cin >> a;
cout << "The integer is = "<
using namespace std;
int main()
{
char a;
cout << "Enter any character = ";
cin >> a;
cout<<"your value is = "<< a;
return 0;
}
Q3. Write a program in C++ to input double point value from the user and print it on the console?
#include
using namespace std;
int main()
{
double a;
cout << "Enter any num = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q4. Write a program in C++ to input the bool type from the user and print it on the console?
#include
using namespace std;
int main()
{
bool a;
cout << "Enter any logic = ";
cin >> a;
cout << "your value is = " << a;
return 0;
}
Q5. Write a program in C++ to take marks of four subjects, for example, English, Urdu, math, and Islamiyat from the user and print in on the console?
#include
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
cout << "Enter the english marks = ";
cin >> a;
cout <<"your marks in english are = " << a << "\n";
cout << "Enter the math marks = ";
cin >> b;
cout << "your marks in math are = " << b << "\n";
cout << "Enter the urdu marks = ";
cin >> c;
cout << "your marks in urdu are = " << c << "\n";
cout << "Enter the islamiat marks = ";
cin >> d;
cout << "your marks in islamiat are = " << d << "\n";
return 0;
}
Q6. Write a program in C++ to take two values and print their sum on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "sum = "<
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Product is = " << a * b << "\n";
return 0;
}
Q8. Write a program in C++ to take two values and print their Division on the console?
#include
using namespace std;
int main()
{
float a = 0;
float b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "divide = " << a / b << "\n";
return 0;
}
Q9. Write a program in C++ to take two values and print their Mod on the console?
#include
using namespace std;
int main()
{
int a = 0;
int b = 0;
cout << "enter the 1st value = ";
cin >> a;
cout << "enter the 2nd value = ";
cin >> b;
cout << "Reminder is = " << a % b << "\n";
return 0;
}
Laiq Ahmed
CMS= 406985
sir mera comment ni ho rha hy
ReplyDelete#include
ReplyDeleteusing namespace std;
int main()
{
int a,b;
cout <<"Enter values";
cin>>a <>b;
cout<<"The Remainder is " <<a%b;
return 0;
}
Q8: Write a program in C++ to take two values and print their Division on the console?
ReplyDelete#include
using namespace std;
int main()
{
int a,b;
cout <<"Enter values";
cin>>a <>b;
cout<<"Division of values is " <<a/b;
return 0;
}
Question # 1
ReplyDelete#include
using namespace std;
void main()
{
int a;
cout<<"Enter Anay Number = "<>a;
cout<<"The Entered Number is = "<
using namespace std;
void main()
{
char a;
cout<<"Enter Any Character = "<>a;
cout<<"The Entered Character is = "<
using namespace std;
void main()
{
double a;
cout<<"Enter Any Value = "<>a;
cout<<"The Entered Value is = "<
using namespace std;
void main()
{
bool a=1>0;
cout<<"Boolien Expression = "<
using namespace std;
void main()
{
int Isl,Eng,Ur,Math;
cout<<"Enter Islamiyat Marks = "<>Isl;
cout<<"Enter English Marks = "<>Eng;
cout<<"Enter Urdu Marks = "<>Ur;
cout<<"Enter Math's Mars = "<>Math;
cout<<"Islamiyat = "<
using namespace std;
void main()
{
int Isl,Eng,Ur,Math;
cout<<"Enter Islamiyat Marks = "<>Isl;
cout<<"Enter English Marks = "<>Eng;
cout<<"Enter Urdu Marks = "<>Ur;
cout<<"Enter Math's Mars = "<>Math;
cout<<"Islamiyat = "<
using namespace std;
void main()
{
int a,b,mul;
cout<<"Enter First Value = "<>a;
cout<<"Enter Second Value = "<>b;
mul=a*b;
cout<<"The Multiplication of the Values = "<
using namespace std;
void main()
{
float a,b,div;
cout<<"Enter First Value = "<>a;
cout<<"Enter Second Value = "<>b;
div=a/b;
cout<<"The Division of the Values = "<
using namespace std;
void main()
{
int a,b,mod;
cout<<"Enter First Value = "<>a;
cout<<"Enter Second Value = "<>b;
mod=a%b;
cout<<"The Modulation of the Values = "<<mod<<"\n";
system("pause");
}
Muhammad Bilal
S/O Rana Aurangzaib
Section A
#include
ReplyDeleteusing namespace std;
int main()
{
int english;
int urdu;
int math;
int islamiyt;
cout << "enter your marks in english " << "\n";
cin >> english;
cout << "your number in english is " << english << "\n";
cout << "enter your marks in urdu " << "\n";
cin >> urdu;
cout << "your number in urdu is " << urdu << "\n";;
cout << "enter your marks in math " << "\n";
cin >> math;
cout << "your number in math is " << math << "\n";;
cout << "enter your marks in islamiyt " << "\n";
cin >> islamiyt;
cout << "your marks in islamiyt is " << islamiyt << "\n";;
return 0;
}
Post a Comment