HameTask (Solution)
HameTask (Solution)
HameTask (Solution)
//21F-9338_ANAS_ABDUR_RAHMAN_SECTION_C
#include <iostream>
int main()
//DECLARING VARIABLES
int num;
int years,weeks,days;
cout<<"Enter Days:";
//FORMULAS USED
years=num/365;
weeks=(num-years*365)/7;
days=(num-years*365)%7;
//OUTPUTS
cout<<"\n Years:"<<years;
cout<<"\n Weeks:"<<weeks;
cout<<"\n Days:"<<days;
return 0;
Screenshot: -
HOME TASK 2 CODE: -
//21F-9338_ANAS_ABDUR_RAHMAN_SECTION_C
#include<iostream>
int main()
//DECLARING VARIABLES.
int angle1,angle2,angle3;
cin>>angle1;
cin>>angle2;
angle3=180-(angle1+angle2);
return 0;
Screenshot: -
HOME TASK 3 CODE: -
#include<iostream>
int main()
//DECLARING VARIABLES
int eng,pf,la,dld,ict;
int prcnt,avrg,total,obt;
cin>>eng;
cin>>pf;
cin>>dld;
cin>>ict;
total=500;
obt=eng+pf+la+dld+ict;
avrg=obt/5;
prcnt=obt*100/total;
//OUTPUTS
cout<<"Obtained Marks="<<obt;
cout<<" \n Average="<<avrg;
cout<<" \n Percentage="<<prcnt;
return 0;
Screenshot: -
HOME TASK 4 CODE:-
//21F-9338_ANAS_ABDUR_RAHMAN_SECTION_C
#include<iostream>
int main()
//DECLARING VARIABES
int A,B;
cout<<"A=";
cin>>A;
cout<<"B=";
cin>>B;
//FORMULA
A=A+B;
B=A-B;
A=A-B;
cout<<"\n A="<<A;
cout<<"\n B="<<B;
return 0;
Screenshot: -
#include<iostream>
int main()
cout<<"a=";
cout<<"b=";
cout<<"c=";
cout<<"d=";
cout<<"f=";
cout<<"g=";
cout<<"h=";
Expression=((a*b)*c+(d+f)/g)-h;
cout<<"Expression="<<Expression;
return 0;
}
Screenshot: -
//21F-9338_ANAS_ABDUR_RAHMAN_SECTION_C
#include<iostream>
int main()
cout<<" * * * * * * * * * ** \n";
cout<<" * * *\n";
cout<<" * * *\n";
cout<<" * * *\n";
cout<<" * * *\n";
cout<<" * * *\n";
cout<<" * * * * * * * * * * * * ** \n";
cout<<" * * *\n";
cout<<" * * *\n";
cout<<" * * * * *\n";
cout<<" * * * * *\n";
cout<<" * * * * *\n";
cout<<" * * * * * * * * * * * * ** \n";
return 0;
Screenshot: -
//21F-9338_ANAS_ABDUR_RAHMAN_SECTION_C
#include <iostream>
int main(){
cout<<" ********************************\n";
cout<<" ********************************\n";
cout<<" ********************************\n";
cout<<" ******************************\n";
cout<<" ****************************\n";
cout<<" **************************\n";
cout<<" ************************\n";
cout<<" **********************\n";
cout<<" ********************\n";
cout<<" ******************\n";
cout<<" ****************\n";
cout<<" **************\n";
cout<<" ************\n";
cout<<" **********\n";
cout<<" ********\n";
cout<<" ******\n";
cout<<" ****\n";
cout<<" **\n";
return 0;
}
Screenshot: -
BAD STORY:-
I Stayed up all night to prepare for my Quiz. Next
morning because of restlessness, I Was unable to even Understand the
Questions properly. :/
GOOD STORY:-
Idhr kuch Acha bhi Hota he? XD!