Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8825ef1
Create p.txt
PARAVPREET17 Oct 2, 2021
f6a40cf
Add files via upload
PARAVPREET17 Oct 2, 2021
e499088
Delete p.txt
PARAVPREET17 Oct 2, 2021
d5e842b
Merge branch 'ritikrajdev:main' into main
PARAVPREET17 Oct 2, 2021
b8a7c8e
Add files via upload
PARAVPREET17 Oct 2, 2021
ecefed2
Add files via upload
PARAVPREET17 Oct 2, 2021
8185892
Delete 102015048_ENC2_Assignment 1 set 1.docx
PARAVPREET17 Oct 2, 2021
444c6aa
Delete 102015048_ENC2_assignment 1 set 2.docx
PARAVPREET17 Oct 2, 2021
3ec34d5
Delete 102015048_ENC2_Assignment 2 set 1.doc
PARAVPREET17 Oct 2, 2021
04fe40f
Delete 102015048_ENC2_Assignment 3 set 1.docx
PARAVPREET17 Oct 2, 2021
d236a96
Add files via upload
PARAVPREET17 Oct 2, 2021
a3da8e6
Add files via upload
PARAVPREET17 Oct 2, 2021
d8c1a59
Delete 102015048_ENC2_Assignment 4 set 1.docx
PARAVPREET17 Oct 2, 2021
d2d868e
Delete 102015048_ENC2_Assignment 4 set 2.docx
PARAVPREET17 Oct 2, 2021
728c88b
Delete 102015048_ENC2_Assignmemt 4 set 2.pdf
PARAVPREET17 Oct 2, 2021
41782e7
Delete plagiarismdetector.pdf
PARAVPREET17 Oct 2, 2021
bacaf0f
Delete 102015048_ENC2_Assignment 5 set 1.docx
PARAVPREET17 Oct 2, 2021
9718fe6
Add files via upload
PARAVPREET17 Oct 2, 2021
1ce9628
Delete ~$b Assignment-11.doc
PARAVPREET17 Oct 2, 2021
6c155d6
Delete 102015048_1NC2_Assignmnet 11 set 2.doc
PARAVPREET17 Oct 2, 2021
57bc262
Delete 10201548_ENC2_Assignment 6 set 2.docx
PARAVPREET17 Oct 2, 2021
1d875af
Delete 102015048_ENC2_Assignment 8 set 2.docx
PARAVPREET17 Oct 2, 2021
858b289
Merge branch 'ritikrajdev:main' into main
PARAVPREET17 Oct 2, 2021
b300889
Create p.txt
PARAVPREET17 Oct 2, 2021
dc79681
Delete p.txt
PARAVPREET17 Oct 2, 2021
1b00af0
Merge branch 'ritikrajdev:main' into main
PARAVPREET17 Oct 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <iostream>

using namespace std;

int main()
{
cout << "Hello World";

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include<iostream>

using namespace std;

int main()
{
cout <<"Implementation of new line\n" << "and endLine" << endl << "Displayed in the next line" << endl;
cout << "Tab \t usage" << endl;
cout << "Alarm sound will be rung \a" << endl;
cout << "Carriage\rReturn" << endl;
cout << "Carria is overwritten as cursor moves to the beginning of the line to print Return" << endl;
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <iostream>
using namespace std;
namespace ns1
{
int value()
{
return 5;
}
}
namespace ns2
{
const double x = 100;
double value()
{
return 2*x;
}
}

int main()
{
int x=500;
// Access value function within ns1
cout << ns1::value() << '\n';

// Access value function within ns2
cout << ns2::value() << '\n';

// Access variable x directly
cout << ns2::x << '\n';

// Access local variable x
cout << x << endl;

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <iostream>
using namespace std;

struct Student
{
string Name;
int roll;
float marks;

void setStudentData()
{
cin >> Name;

cin >> roll;

cin >> marks;
}

void getStudentData()
{
cout << "Name:"
<< " " << Name << endl;
cout << "Roll no.:"
<< " " << roll << endl;
cout << "Marks:"
<< " " << marks << endl;
}
};
int main()
{
Student s[3];
int i;
for (i = 0; i < 3; i++)
{
cout << "Enter details of student" << i + 1 << ":" << endl;
s[i].setStudentData();
}

for (int i = 0; i < 3; i++)
{
cout << "Details of student" << i + 1 << ":" << endl;
s[i].getStudentData();
}

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <iostream>
using namespace std;

struct Student
{
private:
string Name;
int roll;
float marks;
public:
void setStudentData()
{
cin >> Name;

cin >> roll;

cin >> marks;
}

void getStudentData()
{
cout << "Name:"
<< " " << Name << endl;
cout << "Roll no.:"
<< " " << roll << endl;
cout << "Marks:"
<< " " << marks << endl;
}
};
int main()
{
Student s[3];
int i;
for (i = 0; i < 3; i++)
{
cout << "Enter details of student" << i + 1 << ":" << endl;
s[i].setStudentData();
}

for (int i = 0; i < 3; i++)
{
cout << "Details of student" << i + 1 << ":" << endl;
s[i].getStudentData();
}

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#include <iostream>
using namespace std;

class Student
{
private:
string Name;
int roll;
float marks;

public:
void setStudentData()
{
cin >> Name;

cin >> roll;

cin >> marks;
}

void getStudentData()
{
cout << "Name:"
<< " " << Name << endl;
cout << "Roll no.:"
<< " " << roll << endl;
cout << "Marks:"
<< " " << marks << endl;
}
};
int main()
{
Student s[3];
int i;
for (i = 0; i < 3; i++)
{
cout << "Enter details of student" << i + 1 << ":" << endl;
s[i].setStudentData();
}

for (int i = 0; i < 3; i++)
{
cout << "Details of student" << i + 1 << ":" << endl;
s[i].getStudentData();
}

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include<iostream>
using namespace std;

int main()
{
cout<<"Hello world";
return 0;
}
24 changes: 24 additions & 0 deletions Computer Engineering - BE/Sem 2/UTA018/Assignment 1 of set 2/2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <iostream>
using namespace std;

int main()
{
int num, max = 300, i, flag;

for (num = 1; num <= max; num++)
{
flag = 0;
for (i = 2; i <= num / 2; i++)
{
if (num % i == 0)
{
flag = 1;
break;
}
}

if (flag == 0 & num != 1)
cout<<"\t"<<num;
}
return 0;
}
13 changes: 13 additions & 0 deletions Computer Engineering - BE/Sem 2/UTA018/Assignment 1 of set 2/3.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>
using namespace std;

int main()
{
float c, f;

cout << "Enter celsius degree to find temperature in fahreheit: ";
cin >> c;
f = c*1.8 + 32;
cout << "Fahreheit= " << f;
return 0;
}
53 changes: 53 additions & 0 deletions Computer Engineering - BE/Sem 2/UTA018/Assignment 1 of set 2/4.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include <iostream>
using namespace std;

int main()
{
//if statement
int i = 10;

if (i > 15)
{
cout << "10 is less than 15";
}

//if else
int j = 20;

if (j < 15)
printf("j is smaller than 15");
else
printf("j is greater than 15");


//if else if ladder
int k = 20;

if (k == 10)
printf("k is 10");
else if (k == 15)
printf("k is 15");
else if (k == 20)
printf("k is 20");
else
printf("k is not present");


//switch case
int x = 2;
switch (x)
{
case 1:
cout << "Choice is 1";
break;
case 2:
cout << "Choice is 2";
break;
case 3:
cout << "Choice is 3";
break;
default:
cout << "Choice other than 1, 2 and 3";
break;
}
}
Loading