This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hello Ruby World!!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| clrscr(); | |
| char charac; | |
| cout << "Enter your letter : " << endl; | |
| cin>>charac; | |
| cout << "The 2 letters are : " << endl; | |
| cout << (char)(charac-1) << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <iostream.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| clrscr(); | |
| int x,y,sum; | |
| float average; | |
| cout << "Enter 2 integers : " << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| clrscr(); | |
| int x; | |
| int A[4][4],sum=0; //Reading the matrix. | |
| cout << "Enter the elements of the matrix : " << endl; | |
| for(int y=0;y<4;y++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| clrscr(); | |
| int a,b,x,y,num1,ct; | |
| a=0; | |
| b=1; | |
| cout << "Enter the number of terms (less than 25) : " << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| #include <math.h> | |
| int main() | |
| { | |
| clrscr(); | |
| float a,b,c,d,root1,root2; | |
| cout << "Enter the 3 coefficients a, b, c : " << endl; | |
| cin>>a>>b>>c; | |
| if(!a){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| int fact (int i) { | |
| int result = 1; | |
| while (i > 0) { | |
| result = result * i; | |
| i = i-1; | |
| } | |
| return(result); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| int main() | |
| { | |
| clrscr(); | |
| int x,y,z,biggest; | |
| cout << "Enter 3 integers : "; | |
| cin>>x>>y>>z; | |
| biggest=x>y?(x>z?x:z):(y>z?y:z); | |
| cout << "The biggest integer out of the 3 integers you typed "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| clrscr(); | |
| int x; | |
| cout << "Enter an integer : "; | |
| cin>>x; | |
| if(x%2==0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| #include <conio.h> | |
| int main() | |
| { | |
| clrscr(); | |
| int x,y,quotient,remainder; | |
| cout << "Enter 2 integers greater than 0 : "; | |
| cin>>x>>y; | |
| quotient=x/y; | |
| remainder=x-(quotient*y); |
OlderNewer