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 <string.h> | |
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| class Permute{ | |
| int start,end,count; | |
| char *f,*str; | |
| public: | |
| Permute(char* st,char* fn){ // fn = file name / full path with name |
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> | |
| double my_sqrt(int,int); | |
| int main() | |
| { | |
| int num,root; // root can be 2,3,4... | |
| //root depends you want to take square , cube , 4rth , 5th , nth root of any number | |
| cout<<"Enter Your Value N :=:"; cin>>num; cout<<"\n"; | |
| if(num<0){ | |
| cout<<"Square Root of -ve entry in real Number is Not Possible\n"; |
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> | |
| using namespace std; | |
| int main(void){ // coded by Zuqurnain jutt | |
| int num=1,den=1,t1=1; | |
| double n=0.25,t2=1; // n can be any number | |
| for(int i=1;;i++){ | |
| t2=i*n; | |
| t1=t2; | |
| t2-=t1; |
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 <string.h> | |
| class student | |
| { | |
| char *arr[5]; | |
| public: | |
| student(void){ | |
| for(int i=0;i<5;i++){ |
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 <string.h> | |
| class student | |
| { | |
| char *arr[5]; | |
| public: | |
| void setarr() | |
| { |
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> | |
| #inlcude <math.h> | |
| int main(){ // Done By Zulqurnain jutt | |
| double Numerator , Denominator , Result; | |
| cout<<"Enter Numerator :=:"; cin>>Numerator; | |
| cout<<"Enter Denominator :=:"; cin>>Denominator; |
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 main(){ // Simple Prime Checker | |
| int n; | |
| cout<<"Enter Your Number :=:"; cin>>n; | |
| /*Logic is simple ! if a number is divisible by more than 2 times ,, when approaching it from 1 to n then | |
| its not prime else it is prime . | |
| */ | |
| int t=1,i=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> | |
| int main(){ | |
| int Deci,i=0; | |
| int THex[100]; // Reason To Use : We Need A,B,C,D,E character To Represent Value of HEX | |
| char Hex[100]; // Stores HEX | |
| cout<<"Enter Decimal Number :=:"; cin>>Deci; | |
| int Current_r=Deci , Current_q=Deci; | |
| while(Current_q>=16){ // getting all remainders in array Reversed |
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 <stdlib.h> | |
| int main(){ // By Zulqurnain jutt | |
| int n; | |
| char c[100]; | |
| cout<<"Enter Your Number :=:"; cin>>c; | |
| for(int it=0,Fail=0,Pass=0;c[it]!='\0';it++){ |
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 <fstream.h> | |
| int main() | |
| { | |
| ofstream fout; | |
| int i; char ch; | |
| // File opening in output mode both | |
| fout.open("d:/test.txt",ios::in); | |
| if(!fout) |