ALGORITHM VARIABLES: § i: loop counter of array. § A: array name. § LB: lower bound. § UB: upper bound. ALGORITHM: STEP 1: set i =LB STEP 2: repeat steps 3 & 4 While i<=UB STEP 3: apply process to A[i] STEP 4: i = i+1 STEP 5: exit EXPLANATION: § To traverse the elements of the array, firstly set the loop counter ‘i’ equal to last element of the array called the LOWER BOUND. ...
#include<iostream.h> #include<conio.h> class bca { public: inline int sum(int x, int y) { return(x+y); } }; int main() { clrscr(); int r,a,b; bca obj; cout<<"enter two integers :"<<endl; cin>>a>>b; r=obj.sum(a,b); cout<<" the sum of two integers is :"<<r<<endl; getch(); return 0; } OUTPUT:- enter two integers : 3 6 the sum of two integer is : 9
This is the question you always want to answer to someone but you didn't get it yet yourself. First I clear one thing that i am not a good programmer and not the writer at all but i can say i am still learning. Yes I am better than quite a few people when it comes to programming, but that's merely because they are lazy and like to sit on idly all day and never bother about programming. Their horrible skills make my less horrible skills look marvelous. Things that's help you to be a good programmer mention below they are what I have wanted to be and I am not. So lets dive in. 1.Decide why you want to become a good programmer this is the main question you have to ask yourself Is it because you want a job, preferably in a high paying software firm? Great. Then you are set to reach NOWHERE. All good programmers I know are good because they loved what they did. 2. Programming languages Very often people equate good coding skills with number of programming langauges k...
Comments
Post a Comment