Skip to content

Commit

Permalink
LB
Browse files Browse the repository at this point in the history
LB
  • Loading branch information
vaibhavpatilX authored Jun 22, 2024
1 parent 7f6f947 commit 4c53964
Show file tree
Hide file tree
Showing 100 changed files with 3,422 additions and 0 deletions.
61 changes: 61 additions & 0 deletions 200.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#include<iostream>
using namespace std;

class ArrayX
{
public:
int * Arr;
int iSize;

ArrayX(int i)
{
cout<<"Allocating the memory for resources...."<<"\n";
iSize = i;
Arr = new int(iSize); // Arr = (int *)malloc(iSize * sizeof(int));
}

~ArrayX()
{
cout<<"Deallocating the memory of resources...."<<"\n";
delete []Arr;
}


void Accept()
{
cout<<"Enter the elements of array : "<<"\n";

for(int iCnt = 0;iCnt < iSize;iCnt++)
{
cin>>Arr[iCnt];
}
}

void Display()
{
cout<<"Elements of array are : "<<"\n";

for(int iCnt = 0;iCnt < iSize;iCnt++)
{
cout<<Arr[iCnt]<<"\t";
}
cout<<"\n";
}
};

int main()
{
int iLength = 0;

cout<<"enter the size of array : "<<"\n";
cin>>iLength;

ArrayX * obj = new ArrayX(iLength); //Dynamic

obj->Accept();
obj->Display();

delete obj;

return 0;
}
Binary file added Arithematic.class
Binary file not shown.
Binary file added ArrayX.class
Binary file not shown.
Binary file added DBMS.class
Binary file not shown.
Binary file added Digits.class
Binary file not shown.
Binary file added Marvellous Pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Marvellous.class
Binary file not shown.
Binary file added My.exe
Binary file not shown.
Binary file added Node.class
Binary file not shown.
Binary file added Numbers.class
Binary file not shown.
55 changes: 55 additions & 0 deletions PRogram115.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Row = 4
Col = 4
# 1 1 1
1 # 2 2
3 3 # 3
4 4 4 #
*/

#include<stdio.h>

void Display(int iRow, int iCol)
{
int i = 0, j = 0;

if(iRow != iCol)
{
printf("Row number and column numbers are diffrent\n");
return;
}

for(i = 1; i<= iRow; i++)
{
for(j = 1; j<=iCol; j++)
{
if(i == j)
{
printf("#\t");
}
else
{
printf("%d\t",i);
}
}
printf("\n");
}
}

int main()
{
int iValue1 = 0, iValue2 = 0;

printf("Enter number of rows\n");
scanf("%d",&iValue1);

printf("Enter number of columns\n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}
Binary file added Pattern.class
Binary file not shown.
33 changes: 33 additions & 0 deletions PatternTemplate.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Row = 4;
Col = 4;
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
*/

#include<stdio.h>

int main()
{
int iValue1 = 0;
int iValue2 = 0;

printf("enter number of rows\n");
scanf("%d",&iValue1);

printf("enter number of columns\n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}

void Display(int iRow, int iCol)
{

}
39 changes: 39 additions & 0 deletions Program10.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Problem statement : Accept number from user and check wheather it is divisible by 5 or not

#include<stdio.h>
#include<stdbool.h>

bool DivisibleByFive(int iNo)
{
int iAns = 0;
iAns = iNo % 5;

if(iAns == 0)
{
return true;
}
else
{
return false;
}
}
int main()
{
int iValue = 0;
bool bRet;

printf("Enter number : \n");
scanf("%d",&iValue);

bRet = DivisibleByFive(iValue);
if (bRet == false)
{
printf("%d is not divisible by 5",iValue);
}
else
{
printf("%d is divisible by 5",iValue);
}

return 0;
}
Binary file added Program10.exe
Binary file not shown.
47 changes: 47 additions & 0 deletions Program100.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//Row 4
//Columns 4
/*
* * * *
* * * *
* * * *
* * * *
*/

#include<stdio.h>

void Display(int iRow, int iCol) //N^2
{
int i = 0, j =0;
if(iRow < 0)
{
iRow = -iRow;
}
if(iCol < 0)
{
iCol = -iCol;
}

for(i=1; i<=iRow;i++)
{
for(j = 1;j <= iCol; j++)
{
printf("*\t");
}
printf("\n");
}
}

int main()
{
int iValue1 = 0, iValue2 = 0;

printf("Enter number of rows \n");
scanf("%d",&iValue1);

printf("Enter number of columns \n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}
47 changes: 47 additions & 0 deletions Program101.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//Row 4
//Columns 4
/*
* * * *
* * * *
* * * *
* * * *
*/

#include<stdio.h>

void Display(int iRow, int iCol) //N^2
{
int i = 0, j =0;
if(iRow < 0)
{
iRow = -iRow;
}
if(iCol < 0)
{
iCol = -iCol;
}

for(i=1; i<=iRow;i++)
{
for(j = 1;j <= iCol; j++)
{
printf("*\t");
}
printf("\n");
}
}

int main()
{
int iValue1 = 0, iValue2 = 0;

printf("Enter number of rows \n");
scanf("%d",&iValue1);

printf("Enter number of columns \n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}`
42 changes: 42 additions & 0 deletions Program102.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Row = 4;
Col = 4;
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
*/

#include<stdio.h>


void Display(int iRow, int iCol)
{
int i =0, j =0;

for(i=1; i<=iRow;i++)
{
for(j=1; j <= iCol; j++)
{
printf("%d\t",j);
}
printf("\n");
}
}

int main()
{
int iValue1 = 0,iValue2 = 0;

printf("enter number of rows\n");
scanf("%d",&iValue1);

printf("enter number of columns\n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}
42 changes: 42 additions & 0 deletions Program103.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Row = 4;
Col = 4;
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
*/

#include<stdio.h>


void Display(int iRow, int iCol)
{
int i =0, j =0;

for(i=1; i<=iRow;i++)
{
for(j=1; j <= iCol; j++)
{
printf("%d\t",i);
}
printf("\n");
}
}

int main()
{
int iValue1 = 0,iValue2 = 0;

printf("enter number of rows\n");
scanf("%d",&iValue1);

printf("enter number of columns\n");
scanf("%d",&iValue2);

Display(iValue1,iValue2);

return 0;
}
Loading

0 comments on commit 4c53964

Please sign in to comment.