Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 31
Member Avatar for sahil_logic

hi all, i am trying to generate a pattern [CODE] 1 121 12321 1234321 123454321 1234321 12321 121 1 [/CODE] but the code is not compiling i am getting the foolowing errors C:\Dev-Cpp\files\patterns.cpp:102: error: name lookup of `j' changed for new ISO `for' scoping C:\Dev-Cpp\files\patterns.cpp:98: error: using obsolete binding at …

Member Avatar for sahil_logic
0
340
Member Avatar for sahil_logic

i copied the code as is discussed by my professor and written in my course book but i am not getting the correct output. my logic is very clear but not getting the right output, its a bunch of positive n negative values. pls check . the code is compiling …

Member Avatar for SpS
0
125
Member Avatar for sahil_logic

plz give me links or discuss on address calculation in 2d arrays. i have little knowledge of calculating the address. can any one give some formula or something coz my professor gave it but i wasnt able to follow . i remember he was using terms like rowmajor, column major, …

Member Avatar for Ancient Dragon
0
165
Member Avatar for sahil_logic

i do not want to use strcmp() so i made it myself. here is my code: [code]#include<iostream.h> #include<conio.h> #include<stdio.h> int main() { char pass[50]; int strcomp(char pass); cout<<" ENTER THE PASSWORD "; gets(pass); int m=strcomp(pass); if(m==1) cout<<" congrats! correct password "; else cout<<" sorry wrong password "; } int strcomp(char …

Member Avatar for perniciosus
0
381
Member Avatar for sahil_logic

[code]#include<iostream.h> #include<conio.h> int main() { int a[10],temp,bak; cout<<" enter the elements "<<endl; for(int i=0;i<5;i++) cin>>a[i]; int m=a[0]; for(int j=0;j<5;j++) { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } cout<<endl; for(int k=0;k<5;k++) { cout<<a[k]<<endl; } getch(); }[/code]

Member Avatar for perniciosus
0
185
Member Avatar for sahil_logic

//square matrix #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void diagsum(int a[10][10],int n); void rowsum (int a[10][10],int n); void colsum (int a[10][10],int n); int a[10][10]; int n,opt; cout<<" enter the size of matrix (say 4 for 4/4etc..) "; cin>>n; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) {cin>>a[j]; } } for(int k =0;k<n;k++) { …

Member Avatar for dwks
0
108
Member Avatar for sahil_logic

#include<iostream.h> #include<conio.h> int main() { void sortarray(int array[15],int size); void mergearray(int ar1[15], int ar2[15], int ar3[30],int m ,int n); int m, n ,ar1[15],ar2[15],ar3[30],array[15],size; cout<<" Enter the size of the arrays "<<endl; cin>>m>>n; cout<<" Enter the elements of first array "<<endl; for(int i=0;i<m;i++) cin>>ar1; cout<<" Enter the elements of second array …

Member Avatar for dwks
0
190
Member Avatar for sahil_logic

[code] #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void palcheck(char str[]); char ans; char str[20]; do { cout<<"Enter the string to check if it is a palindrome. "; gets(str); palcheck(str); cout<<"\nEnter Y to continue. "; cin>>ans; }while (ans=='y'||ans=='Y'); } void palcheck(char str[]) { int l=0,k=0,flag; for(int i=0;str[i]!='\0';i++) l=l+1; k=l; for(int j=0;j<l/2;j++) …

Member Avatar for dwks
0
144
Member Avatar for sahil_logic

#include<iostream.h> #include<conio.h> int main() { int a[5],loc,val,ans; do { cout<<" enter the elements "<<endl; for(int i=0;i<5;i++) cin>>a; cout<<" enter the location u want to edit with respect to zero "; cin>>loc; cout<<" enter the val to be inserted "; cin>>val; for(int j=6;j<0;j--) { if(j==loc) a[j]=val; else if(j>loc) a[j]=a[j-1]; } for(int …

Member Avatar for Asif_NSU
0
93
Member Avatar for sahil_logic

hello everyone i was trying to make my own own string concatenation function but wasnt able to do so. i need ur help.

Member Avatar for Dave Sinkula
0
1K