Programming World👨💻
Open in Telegram
All programming language tutorials,courses and more..! For HTML: @html_web_learn For CSS: @CSS_web_learn For JS: @JavaScript_js_learn For PHP: @learn_php_web For Programming courses @Programmingworld_dev For CEH,Cybersec: @technical_stark
Show moreThe country is not specifiedTechnologies & Applications34 732
1 412
Subscribers
No data24 hours
-57 days
-1330 days
Posts Archive
1 412
TCS ninja online test instructions!
Dear all, some of the key points to note for the candidates :
1.Candidates need to carry 2 copies of hall ticket, college ID card and any govt ID proof
2.If any of the candidate do not have their original ID proof they can bring a copy of it, that would be suffice.
3.Scientific calculator and other electronic gadgets are not allowed inside the examination hall.
With respect to test :
1.Candidate in the coding section need to scroll down the page and check the output message post compiling.
2.Process to use debugger :
When students use debugger they will have to select File> new > project selection (Java c++) > give the project name > click the file>Next> Save or Finish
Left side the project name would have been created :
Select that file > File> File > Give a project name and save it > Type the code> Run
3.1/3rd of negative marking for all MCQs
4.After every answer the candidate has to click on the submit button on screen.
@Programmingg_world
1 412
Program to calculate the determinant of 2×2 matrix.
#include<stdio.h>
#include<conio.h>
void main()
{
int a[2][2], i, j;
long determinant;
clrscr();
printf("Enter the 4 elements of matrix :\n");
for (i = 0; i < 2; i++)
{
for (j = 0; j < 2; j++)
{
scanf("%d", &a[i][j]);
}
}
printf("\nThe matrix is : \n");
for (i = 0; i < 2; i++)
{
printf("\n");
for (j = 0; j < 2; j++)
{
printf("%d\t", a[i][j]);
}
}
determinant = a[0][0] * a[1][1] - a[1][0] * a[0][1];
printf("\nDeterminant of 2X2 matrix: %ld", determinant);
getch();
}1 412
Solution for [Day1]
Class Day1code{
public int createPin (int input1,int input2,int input3){
int res=0,max=0;
for(int i=0,ca=1;i<3;i++)
{
int a=input1%10,b=input2%10,c=input3%10;
if(a>max)
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
//System.out.println(a+"="+b+"="+c+"=="+res);
if(a<b && a<c)
res=a*ca+res;
else if(b<c && b<a)
res=b*ca+res;
else
res=c*ca+res;
//System.out.println(a+"="+b+"="+c+"=="+res);
input1/=10;
input2/=10;
input3/=10;
ca*=10;
}
return (max*1000+res);
}
}1 412
[Day 1] Create PIN using three given input numbers
"Secure Assets Private Ltd", a small company that deals
with lockers has recently started manufacturing digital
locks which can be locked and unlocked using PINS
(passwords). You have been asked to work on the module
that is expected to generate PIN using three input
numbers
Assumptions: The three given input numbers will always
consist of three digits each i.e. each of them will be in the
range 100 and <999
100input 999
100 <= input2 <= 999
100 input3 < 999
Below are the rules for generating the PIN
- The PIN should be made up of 4 digits
- The unit (ones) position of the PIN should be the least of
the units position of the three input numbers
- The tens position of the PIN should be the least of the
tens position of the three input numbers
The hundreds position of the PIN should be the least of
the hundreds position of the three input numbers
- The thousands position of the PIN should be the
maximum of all the digits in the three input numbers
Example 1
input1 123
input2 582
input3 175
then, PIN 8122
Example 2
input1 190
input2 267
input3 853
then, PIN 9150
1 412
This AI-powered autocompleter tool can speed up your coding
https://thenextweb.com/apps/2019/07/25/this-ai-powered-autocompleter-tool-can-speed-up-your-coding/
1 412
Start Your Path As An IT Professional With A Course From Networking Academy
https://www.netacad.com/courses/all-courses
1 412
Shall I start day-wise practice. Which contains 1 or 2 logical questions and after 12hrs I will send solution
