functions in c++.pdf
688.9 KB
#FOR C++,
THIS pdf covers
- function prototype
- function declaration
- function calling and others....
|| facebook programmers group
||
THIS pdf covers
- function prototype
- function declaration
- function calling and others....
|| facebook programmers group
||
Recursion- C++.pdf
1.1 MB
#BEST NOTE, AND EXAMPLES ON RECURSION.
_ is iterative or recursive algorithm more efficient?
share and join our channel
https://t.me/PROGRAMINGLANGUAGES1
_ is iterative or recursive algorithm more efficient?
share and join our channel
https://t.me/PROGRAMINGLANGUAGES1
#include <iostream>
int print(int p);
int main() { int p; std::cout<<print(5); return 1; } int print(int x) { int p; if(x==0) return 1 ; p=2*print(x-1); return p; } => use print(5)
int print(int p);
int main() { int p; std::cout<<print(5); return 1; } int print(int x) { int p; if(x==0) return 1 ; p=2*print(x-1); return p; } => use print(5)
Final Results
42%
32
25%
63
0%
1
17%
6
17%
check on compiler
๐3
#FOR PYTHON PRACTICES LOOK THIS INFORMATIONS:-
(may be for other languages too)
๐ Learn Python Here :
1. W3schools.com
2. Freecodecamp.org
3. geeksforgeeks.org
4. udacity.com
5. udemy.com
6. codeacademy.com
7. coursera.org
8. edx.org
9. youtube.com
๐ Practice Python Here :
1. codewars.com
2. hackerrank.com
3. topcoder.com
4. coderbyte.com
5. hackerearth.com
6. leetcode.com
7. codechef.com
8. edabit.com
9. codeforces.com
โโ Ask Python Questions here :
1. stackoverflow.com
2. quora.com
3. github.com
4. reddit.com
โฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌ
if u already know these, then share for your friend๐คท๐ผโโ๏ธ๐คท๐ปโโ๏ธ =ยป shareIt
๐บChannel :- telegram
๐facebook :- facebook coders group
(may be for other languages too)
๐ Learn Python Here :
1. W3schools.com
2. Freecodecamp.org
3. geeksforgeeks.org
4. udacity.com
5. udemy.com
6. codeacademy.com
7. coursera.org
8. edx.org
9. youtube.com
๐ Practice Python Here :
1. codewars.com
2. hackerrank.com
3. topcoder.com
4. coderbyte.com
5. hackerearth.com
6. leetcode.com
7. codechef.com
8. edabit.com
9. codeforces.com
โโ Ask Python Questions here :
1. stackoverflow.com
2. quora.com
3. github.com
4. reddit.com
โฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌโฌ
if u already know these, then share for your friend๐คท๐ผโโ๏ธ๐คท๐ปโโ๏ธ =ยป shareIt
๐บChannel :- telegram
๐facebook :- facebook coders group
๐5๐1
INLINE FUNCTION [ C++]
//Inline Function example
#include<iostream.h>
#include<conio.h>
class line
{
public:
inline float mul(float x,float y)
{
return(x*y);
}
inline float cube(float x)
{
return(x*x*x);
}
};
void main()
{
line obj;
float val1,val2;
clrscr();
cout<<"Enter two values:";
cin>>val1>>val2;
cout<<"\nMultiplication value is:"<<obj.mul(val1,val2);
cout<<"\n\nCube value is :"<<obj.cube(val1)<<"\t"<<obj.cube(val2);
getch();
}
Output:
Enter two values:10 20
Multiplication value is:200
Cube value is :1000 8000
//Inline Function example
#include<iostream.h>
#include<conio.h>
class line
{
public:
inline float mul(float x,float y)
{
return(x*y);
}
inline float cube(float x)
{
return(x*x*x);
}
};
void main()
{
line obj;
float val1,val2;
clrscr();
cout<<"Enter two values:";
cin>>val1>>val2;
cout<<"\nMultiplication value is:"<<obj.mul(val1,val2);
cout<<"\n\nCube value is :"<<obj.cube(val1)<<"\t"<<obj.cube(val2);
getch();
}
Output:
Enter two values:10 20
Multiplication value is:200
Cube value is :1000 8000
๐1
PALINDROME NUMBER [ JAVA]
import java.util.*;
class Palindrome
{
public static void main(String args[])
{
String original, reverse="";
Scanner in = new Scanner(System.in);
System.out.println("Enter a string to check if it is a palindrome");
original = in.nextLine();
int length = original.length();
for ( int i = length - 1 ; i >= 0 ; i-- )
reverse = reverse + original.charAt(i);
if (original.equals(reverse))
System.out.println("Entered string is a palindrome.");
else
System.out.println("Entered string is not a palindrome.");
}
}
Output:
Enter a string to check if it is a palindrome
45654
Entered string is a palindrome.
import java.util.*;
class Palindrome
{
public static void main(String args[])
{
String original, reverse="";
Scanner in = new Scanner(System.in);
System.out.println("Enter a string to check if it is a palindrome");
original = in.nextLine();
int length = original.length();
for ( int i = length - 1 ; i >= 0 ; i-- )
reverse = reverse + original.charAt(i);
if (original.equals(reverse))
System.out.println("Entered string is a palindrome.");
else
System.out.println("Entered string is not a palindrome.");
}
}
Output:
Enter a string to check if it is a palindrome
45654
Entered string is a palindrome.
๐1
8 Habits of Highly Effective Programmers
In the contemporary world, software developers are in high demand as they find solutions to real-life issues and turn goals into reality. But programming is not just about writing good codes or reaching the desired output: it includes a lot more. In this listicle, we will discuss the various habits and techniques that successful software developers use to improve their lives as programmers.
ยปThey Understand the Needs of the Business
All skilled programmers realize that codes drive businesses. They bring to life suggestions and ideas forward supporting the company to make profits.
ยปThey are Proactive
The most successful programmers never focus on the things that are out of their control. They follow the proactive approach. They come to work on time and fully invest their energy in the things they can control. Even when they donโt have assigned tasks, they spend time learning new technologies and concepts. They are in the pursuit of constant studying and improvements. Focusing on the important things and being proactive helps to form new great skills.
ยปThey are Used to Planning
If you are a developer, who desires to achieve goals faster, then start planning. When you plan before coding, according to the given requirements, your goals will be achieved faster than usual. Skilled developers, first of all, analyze the core of the problem. They believe that it reduces mistakes in the working process.
ยปThey Write Readable Codes
One of the first things a developer should learn is to write readable codes. Skilled and successful developers ensure that their codes can be easily understood and adjusted. Besides, the readability of the code makes it easier to debug. On the contrary, the code that is written badly can be hard to understand, difficult to maintain and takes a lot longer to debug.
ยปThey Use Version Control
The next super effective habit of successful programmers is that they implement the Version Control System. With the help of this system, you can track the changes made in the documents, websites, programs, etc. Very often, while writing codes programmers need to get back to the previous versions and start fixing bugs. Version Control is a system that makes it possible. One of the most famous Version Control Systems is Git. With Git you donโt have to worry about errors anymore. Create as many versions as you like, experiment and improve. Moreover, Git works much better for group projects.
ยปThey Practice Touch Typing
Another effective and time-saving habit is touch typing. It is a special technique of typing using all the fingers but without looking at the keyboard. Note that itโs not as simple as it may seem at first sight. At the same time, itโs a really important skill a programmer should learn. When starting to learn touch typing, you should, first of all, pay attention to certain hand positions. The main idea is to keep all the fingers on the keyboard all the time.
ยปThey are Used to Testing and Debugging
Testing and debugging can take a lot of time, but skilled programmers prefer to debug as soon as a draft is ready. They are used to turning error reporting in order to be informed where and when the errors are occurring. Besides, errors can be easily detected by debugging instruments (for example, Firebug). You canโt use a single debugging tool for all programming languages. Learn various debugging methods to be able to apply them for different programming languages.
In the contemporary world, software developers are in high demand as they find solutions to real-life issues and turn goals into reality. But programming is not just about writing good codes or reaching the desired output: it includes a lot more. In this listicle, we will discuss the various habits and techniques that successful software developers use to improve their lives as programmers.
ยปThey Understand the Needs of the Business
All skilled programmers realize that codes drive businesses. They bring to life suggestions and ideas forward supporting the company to make profits.
ยปThey are Proactive
The most successful programmers never focus on the things that are out of their control. They follow the proactive approach. They come to work on time and fully invest their energy in the things they can control. Even when they donโt have assigned tasks, they spend time learning new technologies and concepts. They are in the pursuit of constant studying and improvements. Focusing on the important things and being proactive helps to form new great skills.
ยปThey are Used to Planning
If you are a developer, who desires to achieve goals faster, then start planning. When you plan before coding, according to the given requirements, your goals will be achieved faster than usual. Skilled developers, first of all, analyze the core of the problem. They believe that it reduces mistakes in the working process.
ยปThey Write Readable Codes
One of the first things a developer should learn is to write readable codes. Skilled and successful developers ensure that their codes can be easily understood and adjusted. Besides, the readability of the code makes it easier to debug. On the contrary, the code that is written badly can be hard to understand, difficult to maintain and takes a lot longer to debug.
ยปThey Use Version Control
The next super effective habit of successful programmers is that they implement the Version Control System. With the help of this system, you can track the changes made in the documents, websites, programs, etc. Very often, while writing codes programmers need to get back to the previous versions and start fixing bugs. Version Control is a system that makes it possible. One of the most famous Version Control Systems is Git. With Git you donโt have to worry about errors anymore. Create as many versions as you like, experiment and improve. Moreover, Git works much better for group projects.
ยปThey Practice Touch Typing
Another effective and time-saving habit is touch typing. It is a special technique of typing using all the fingers but without looking at the keyboard. Note that itโs not as simple as it may seem at first sight. At the same time, itโs a really important skill a programmer should learn. When starting to learn touch typing, you should, first of all, pay attention to certain hand positions. The main idea is to keep all the fingers on the keyboard all the time.
ยปThey are Used to Testing and Debugging
Testing and debugging can take a lot of time, but skilled programmers prefer to debug as soon as a draft is ready. They are used to turning error reporting in order to be informed where and when the errors are occurring. Besides, errors can be easily detected by debugging instruments (for example, Firebug). You canโt use a single debugging tool for all programming languages. Learn various debugging methods to be able to apply them for different programming languages.
๐3
best_programmers/group
ยปThey are Used to Sharing their Codes
Sharing the code is a great opportunity for the developers, who want to learn on the go. Acting like this can bring you a lot of benefits:
You can be sure that your code is secured. Even in case, your personal computer is acting up, you will have a backup ( like Google Drive);
You will have a chance to get responses about your code from the more experienced developers.
You work on social pressure, which means that you will feel more accountable to finish your projects on time.
ยปClosing words
Habits can bring success. There you go. Choose your favorite programming habits and use them in your daily routine.
ยปThey are Used to Sharing their Codes
Sharing the code is a great opportunity for the developers, who want to learn on the go. Acting like this can bring you a lot of benefits:
You can be sure that your code is secured. Even in case, your personal computer is acting up, you will have a backup ( like Google Drive);
You will have a chance to get responses about your code from the more experienced developers.
You work on social pressure, which means that you will feel more accountable to finish your projects on time.
ยปClosing words
Habits can bring success. There you go. Choose your favorite programming habits and use them in your daily routine.
โค2๐2
Forwarded from Algo programmers
cometitive programming.pdf
1 MB
short way to learn famous programming languages
๐1
Skiena The Algorithm Design Manual.pdf
3.9 MB
BAD HABITS OF CODERS โ๏ธโ
โ๏ธ * Just cramming the code
โ๏ธ * Copy-pasting the sample code from the web
but, do this:-
โ Instead learn "how the algorithm works
โ practice it every day to adapt the syntax rule.
''https://t.me/PROGRAMINGLANGUAGES1
โ๏ธ * Just cramming the code
โ๏ธ * Copy-pasting the sample code from the web
but, do this:-
โ Instead learn "how the algorithm works
โ practice it every day to adapt the syntax rule.
''https://t.me/PROGRAMINGLANGUAGES1
๐1