You are on page 1of 1

NAME : SANIA SHAHID KHAN

ROLL : 2K2O/IT/105
CLASS : BS INFORMATION TECHNOLOGY PART 1
WEEK : 5

EXERCISE 1

#include <iostream>
using namespace std;
int main()
{
int a;
a = 10;
int b = 10;
int c;
cout <<" a = " << a << endl;
cout <<" b = " << b << endl;
cout <<" c = a + b = " << c << endl;
cout <<" a + b = " << a + b << endl;
cout <<" a + b + c = " << a + b + c;
return 0;
}

EXERCISE 2

EXERCISE 3

#include <iostream>
using namespace std;
int main()
{
for (int x=0; x<20; x++)
{
for (int y=0;y<=x;y++)
{
cout<<"*";
}
cout<<endl;
}
for(int b=0;b<=10;b++){
for(int i=0;i<=b;i++){
cout<<"* " ;
cout<<endl;}
}

You might also like