User Profile

Collapse

Profile Sidebar

Collapse
logantr
logantr
Last Activity: May 9 '12, 03:58 PM
Joined: Mar 18 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • logantr
    replied to How can i align the input text to the left?
    in C
    Code:
    #include <iostream>
    #include <cstring>
    #include <conio.h>
    #include <ctype.h>
    
    void alignLeft(char sentence[]);//function prototype
    
    int main()
    {
    	char sentence[500];//takes until 500 character from user
    	
    	alignLeft(sentence);
    
    	system("PAUSE");
    	return 0;
    }   
    
    
    void alignLeft(char sentence[]){//definition
    ...
    See more | Go to post

    Leave a comment:


  • logantr
    replied to How can i align the input text to the left?
    in C
    It takes the string value but it is not give any kind of response then close itself. I can't find where is the problem..
    See more | Go to post

    Leave a comment:


  • logantr
    replied to How can i align the input text to the left?
    in C
    Code:
    #include <iostream>
    #include <cstring>
    using namespace std;
    int main()
    
    {
        char original[500],output[61],word[61];
        
        cout << "Give someting: ";
        cin >> original;
        
        int word_pos=0, original_pos=0;
        
        while(1)
        {
            while ((original[original_pos] == ' ') && (original[original_pos]
    ...
    See more | Go to post

    Leave a comment:


  • logantr
    replied to string combining
    in C
    Done.Thank to you for satisfying answer.
    See more | Go to post

    Leave a comment:


  • logantr
    started a topic string combining
    in C

    string combining

    Code:
    #include <stdio.h>
    #include <ctype.h>
    #include <string.h>
    
    void interpose(char s[], char a[], int pos)
    {
    	char b[80];
    	int j=0;
    	int l=0;
    	for(int i=pos;s[i]!='\0';i++)
    
    	{
    		b[j]=s[i];
    		j++;
    	}
    	b[j]='\0';
    	for(int c=0;a[c]!='\0';c++)
    	{
    		s[pos]=a[c];
    		pos++;
    	}
    	for (int k=pos;b[l]!='\0';pos++)
    ...
    See more | Go to post

  • logantr
    replied to How can i align the input text to the left?
    in C
    I understood what you mean and i will write it, except '... Split the text at the beginning of the last whitespace sequence before the 60th character.' i should try, because i ve some problems in this algoritms. You gave me an general idea that i need(want). Thanks donbock.
    See more | Go to post

    Leave a comment:


  • logantr
    replied to How can i align the input text to the left?
    in C
    I couldn't tell. If a word at the end of line exceeds the column, shift it to the next line without dividing it. And every column should be 60 characters.
    See more | Go to post

    Leave a comment:


  • logantr
    replied to How can i align the input text to the left?
    in C
    Like at ms office..
    and like this left tag.
    See more | Go to post

    Leave a comment:


  • logantr
    started a topic How can i align the input text to the left?
    in C

    How can i align the input text to the left?

    i want to write a program that input a text from user and align it to the left. Is there any command that i can use? How should i think?
    See more | Go to post

  • logantr
    replied to Number of vowel
    in C
    thanks.. it works.. how am i miss it? i think its gonna be okey in time..
    See more | Go to post

    Leave a comment:


  • logantr
    started a topic Number of vowel
    in C

    Number of vowel

    Why my program doesn't work?

    Print number of vowels case-insensitively. For instance in the expression “come here”, there are 4 vowels.

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int vowels(char sentence[], char vowelletters[], int max)
    {
    
    	int vowelcounter=0;
        int i,j=0;
    	for(i=0; i<max; i++)
    	{
    		for(j=0; j<8; j++)
    		
    			if
    ...
    See more | Go to post
No activity results to display
Show More
Working...