User Profile

Collapse

Profile Sidebar

Collapse
ZS369
ZS369
Last Activity: Feb 8 '21, 03:03 PM
Joined: Aug 19 '18
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ZS369
    started a topic handle .csv file
    in C

    handle .csv file

    how do i import a .csv file and save it to a memory buffer of doubles and print the contents of the .cvs file
    See more | Go to post

  • ZS369
    started a topic Dice game
    in C

    Dice game

    Hi, I’m creating a game where the user challenges the computer in a dice game. I was wondering what the algorithm is for coding a game where the user plays against the computer? Each player, the user and computer get to throw two dices each round. The person with the highest dice score wins the round. The person that wins the most out of 3 rounds wins the game however if someone wins the 2 first rounds, a third one isn’t needed to be played.
    See more | Go to post

  • ZS369
    started a topic Why does this Bash script not work?

    Why does this Bash script not work?

    Hi! the following function doesn't work and i've tried to figure out what the problem is but can't figure it out. thank you in advance for any help!

    function modifyUserAssoc iation {
    echo "Do you want to add a user to a group (1) or delete a user from a group (2)?"
    read option

    if [[ $option == 1 ]];
    then
    echo "Enter username"...
    See more | Go to post

  • ZS369
    started a topic problem with if statement

    problem with if statement

    Hi! When one types a user that doesnt exist it immediately goes to the else statement instead of into the if statement and prints user doesnt exist how do i change this? This is my function:

    function viewUserPropert ies {
    echo "Which user would you like to view?"
    read user

    if [[ $user == 0 ]];
    then
    echo "User does not exist!"
    else ...
    See more | Go to post

  • ZS369
    started a topic function pointers
    in C

    function pointers

    how do you find the most frequent number in an array and count how many times it has occured using pointers?
    See more | Go to post

  • ZS369
    started a topic functions and pointers
    in C

    functions and pointers

    im have to write a program that calculates the square root of a number by using functions and pointers. If the number is less then 0, the function squareRoot should return 0 and print in main that the number cant be calculated. If the number is larger than 0, the function squareRoot should return 1 and print the answer in main


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    ...
    See more | Go to post

  • how to remove spaces and special characters in a string using isalpha?

    Wondering how to take a string and remove special characters and spaces.

    Example: how are you?
    would be: howareyou
    See more | Go to post

  • ZS369
    started a topic Error: identifier or '(' before '{' token
    in C

    Error: identifier or '(' before '{' token

    Q: Error: identifier or '(' before '{' token

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    float convertToEuro(float sek);
    
    int main()
    
    {
       float sek, euro, result;
       printf("Mata in antal svenska kronor: \n");
       scanf("%f", &sek);
       result = convertToEuro(sek);
       printf("%.2f kronor motsvarar %.2f Euro",
    ...
    See more | Go to post
    Last edited by zmbd; Aug 19 '18, 09:27 PM. Reason: [z{placed question within body of post}{Please format code/script using the [CODE/] formatting tool}]
No activity results to display
Show More
Working...