No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Re: [CODE] //Declare an str char str[50],str1[50]; accept gets(str); for(init to end of str;>0;var--) store str1[1] = str[n] print str1; [/CODE] | |
[CODE] #include<stdio.h> #include<conio.h> #include<math.h> int a[70]; //src disk array int b[70];//temp disk array int c[70];//tar disk array int val, srcval=1,tempval=0,tarval=0; int es[3] = {1,1,0}; //array to decide iteration of disks from and to int et[3] = {1,0,1}; int etr[3]= {0,1,1}; int os[3] = {1,1,0}; int ot[3] = {0,1,1}; int otr[3]= … | |
Re: It should have been summary[i].Gender. array of struct to be declared summary[3] or any thing. | |
Please check out This Output required [CODE] Aa Cc Bb Dd Ee Ff jj Ii Hh Gg [/CODE] [CODE] #include<stdio.h> #include<conio.h> void main() { char a = 'a',a1 ='a',A = 'A',A1='A'; int i,j,n; clrscr(); for(i =1;i<=4;i++,printf("\n")) { if(i%2!=0) for(j = 1;j<=i;j++) { printf("%c%c ",a,A); a++; A++; } else { a1 … | |
Re: Got one sample. % Preallocate the 256-by-256-by-1-by-20 image array. X = repmat(int16(0), [256 256 1 20]); % Read the series of images. for p=1:20 filename = sprintf('brain_%03d.dcm', p); X(:,:,1,p) = dicomread(filename); end % Display the image stack. montage(X,[]) For Dicomm images, Matlab provide a good c Api's. I would prefer … | |
I wanna write a code which would add the digits before decimal and after decimal. eg:- 12.22 would add upto 3.4 , 491.941 would give 5.5 [CODE] #include<stdio.h> #include<conio.h> #include<string.h> void main() { double a1[5],a ; //array of 5 numbers int b,len,i,sum=0,cnt = 0; char ch[10]; for(i = 0;i<5;i++) // … | |
[CODE] #include<stdio.h> #include<conio.h> void main() { int num[50],i,i1,j,temp = 1,cnt = 0; printf("How many elements "); scanf("%d",&i); printf("Enter the elements "); for(j = 0;j<i;j++) { scanf("%d",&num[j]); } i1 = 0; j=1; while(i1 < i ) { for( ;j<i;j++) { if((num[j] < num[i1])&& (i1<i)) { temp = num[j]; //algorithm for sel … | |
Re: #include<stdio.h> void main() { int i,j,cnt=0,k,sp; for(i = 1;i<=7;i++,printf("\n")) { k = i; for(sp = 7;sp>=i;sp--) printf(" "); for(j = 1;i>1?j<=(i+cnt):j<=i;j++) { printf("%d ",k); if(j<i) k-=1; else k+=1; } cnt++; } } | |
I Wanted some good patterns questions that is challenging. Also some logic teasing questions. forums like codechef have questions bit too absurd to understand. It would be really good if someone could provide questions easy to understand yet logically challenging. | |
how to print the below triangle without using arrays a a b a e i a b c d a e i o u | |
Re: #[CODE]include <stdio.h> int main() { int n; cout<<" *********************************"<<endl; cout<<" *************Problem3************"<<endl; cout<<" *********************************"<<endl<<endl<<endl; cout<<" Please type and odd integer greater than 1"<<endl; cin>>n; if(n%2==0) { cout<<"YOU DID NOT TYPE AN ODD INTEGER !!!"<<endl; } else { if(n==1) { cout<<"YOU NEED AN ODD INTEGER GREATER THAN 1 !!!"<<endl; } else { … |
The End.