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
~14.1K People Reached
Favorite Tags
Member Avatar for vegaseat
Member Avatar for Reverend Jim
15
13K
Member Avatar for nathanurag

[CODE]#include<stdio.h> int main() { int i,j,k,c; char s[1000]; //array to store the input string for(i=0;(c=getchar())!='.';++i) //string to be ended with '.' { s[i]=c; for(j=0;j<=i;++j) { if((s[j]==s[j-1])&&(s[j]=='\n' || s[j]=='\t' ||s[j]==' ')) { j=j-1; } } for(k=0;k<=i;++k) printf("%c", s[k]); } return 0; } [/CODE] I am trying to create a program that …

Member Avatar for vinitmittal2008
0
156
Member Avatar for nathanurag

[CODE=c] #include<stdio.h> #include<math.h> main() { int i=0,j,c,s[100]; double t=0; while((c=getchar())!='\n') { s[i]=c; ++i; } for(j=i;j>0;--j) { t=t+(s[i-1]*(pow(16,(4-((double)i))))); --i; } printf("%d",(int)t); return 0; } [/CODE] HI, i need to write a program that converts an hexadecimal number into integer form (for convenience i'm only considering hexadecimal no. without alphabets from a …

Member Avatar for adnan.siddique
0
123
Member Avatar for nathanurag

[CODE=c] #include<stdio.h> void astrcat(char s[], char t[]); //to concatenate two string main() { int i=0,p=0,q=0,c; char s[100],t[100]; while((c=getchar())!='\n') s[p++]=c; while((c=getchar())!='\n') t[q++]=c; astrcat(s,t); while(s[i]!='\0') printf("%c",s[i++]); return 0; } void astrcat(char s[],char t[]) { int i, j; i = j = 0; while (s[i] != '\0') /* find end of s */ …

Member Avatar for nathanurag
0
108
Member Avatar for nathanurag

[CODE] #include<stdio.h> void reverse(char s[], int i); main() { int i,c; char s[1000]; for(i=0;(c=getchar())!='\n';i++) { s[i]=c; c=getchar(); } void reverse(s,i); [B] //getting error in this line[/B] return 0; } void reverse(char input[], int n) { int i; for(i=n;i>=0;--i) { printf("%c", input[i]); } } [/CODE] i am writing a program to …

Member Avatar for nathanurag
0
299
Member Avatar for nathanurag
Member Avatar for Ancient Dragon
0
147