Search:

Type: Posts; User: kaopei

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    4,740

    10 zeros.. oddly. >_< i thought the \0...

    10 zeros.. oddly.



    >_< i thought the \0 stands for blank characters(Spaces?)... i changed it to ASCII dec 32.. but it still can't detect the spaces




    so i have to make it at i<=k right?...
  2. Replies
    15
    Views
    4,740

    Since i'm planning for the input to be entered...

    Since i'm planning for the input to be entered multiple times. Thats why i needed to reset the value to 0.. If i don't it will take up the last value from the previous cycle.

    That's not the...
  3. Replies
    15
    Views
    4,740

    I put it inside the while loop to rest the...

    I put it inside the while loop to rest the counter everytime a new input is entered.

    @_@ it keeps giving a



    output for a supposed to be


    and it doesnt print only one 0. it prints...
  4. Replies
    15
    Views
    4,740

    Loops keep printing 0

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main()
    {
    char words[200];
    int d,i,k=0;
    while(scanf("%s",words)==1){
    k=strlen(words);
  5. Replies
    1
    Views
    1,778

    Program crashed, no compilation errors

    #include <stdio.h>
    #include <stdlib.h>

    int primecheck(int N, int Y);
    void main()
    {
    int u,l,x;
    float z,a;
    while(scanf("%d %d",&u,&l)==2){
    if(l>u){
  6. Replies
    2
    Views
    989

    Arrays - used for remembering integers

    I have a problem. I want to store an integer to an array which is obtained from an input.


    scanf("%d",&integer);

    eg if the user enters 1234

    it will store it in arrays as

    integer1 - 1
Results 1 to 6 of 6