Search:

Type: Posts; User: Interista

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Program to store 1000 prime numbers in an array and print out every 15th

    This is a program to put the first 1000 numbers in an array and print out every 15th. It compiles but the program crashes.


    #include <stdio.h>
    int main ()
    {
    int array[1000];


    int a=0;
  2. New program to read three numbered integer using getchar

    1. I know I'll get told off for not using int void main() and return 0; but when I tried using them the program wouldn't compile at all. Now it runs but puts out a strange number (i.e. when I input...
  3. #include int void main() { int...

    #include<stdio.h> int void main()


    {


    int num[3]; /*Sets array to 10*/
    int count;
  4. I changed it around as per your instructions. It...

    I changed it around as per your instructions. It wouldn't compile, then I tried it as void main() and return; and it compiled. Look, I'm not saying your wrong, obviously you know more than me, but...
  5. Who says I haven't? I have been banging on the...

    Who says I haven't? I have been banging on the door of various people in the college for weeks and nothing is done. Maybe you're in America where things work much better than they do here. In America...
  6. Perfect thanks!

    Perfect thanks!
  7. I absolutely agree. If there is something easier...

    I absolutely agree. If there is something easier then its that that we should use. However, our lecturer has not taught it to us yet which is ridiculous.
  8. What you're telling me to do though is exactly...

    What you're telling me to do though is exactly what my lecturer tells me not to. This is so confusing.
  9. Program to change lowercase to uppercase and vice-versa

    This program is supposed to take a user input string and change lower case characters to upper case and vice versa. It works except that for spaces between words it puts @ and then it adds some weird...
  10. Storing an integer in an array using getchar

    I'm trying to get getchar to put three numbers which the user will enter as a 3 digit integer into an array. This is part of a bigger program which I believe if I can get this to work I will be able...
  11. That's great. Thanks a million!

    That's great. Thanks a million!
  12. Program to turn a string into ASCII code

    #include<stdio.h>

    int main(){

    char str[5000];
    int i=0;


    printf("Enter any string: ");
    scanf("%s",str);
  13. Replies
    8
    Views
    1,173

    The problem is, as you suggested, he's giving us...

    The problem is, as you suggested, he's giving us stuff which is out-of-context, in that he is not covering it. For example, he wants us to manipulate stuff but doesn't even touch on how to.

    I'm...
  14. Replies
    8
    Views
    1,173

    That the user inputs three numbers which getchar...

    That the user inputs three numbers which getchar gets and puts into a variable.

    I really don't know anymore. There was a program I couldn't get last week and even though all marks have been given...
  15. Replies
    8
    Views
    1,173

    Can I Confirm an Array is A Variable?

    Hi, our assignment asks us to do something with a program where we store three inputs in one variable?

    Surely the easiest way is to use an array?

    But our lecturer told us an array isn't a...
  16. Replies
    10
    Views
    1,218

    Thanks! I already used TheNewBoston and found it...

    Thanks! I already used TheNewBoston and found it really good, the problem is he only goes as far as what we needed for last week.
  17. Replies
    10
    Views
    1,218

    Thanks s much for that! I'll certainly...

    Thanks s much for that!

    I'll certainly distribute it to my students.

    It gets my goat a bit when experts tell us what we should know as its "so basic". Its incredibly basic for me to say, for...
  18. Replies
    10
    Views
    1,218

    And its not being lazy to not understand...

    And its not being lazy to not understand something and ask is there something I can read that would make more sense...

    If more than one student (and most on the course are in the same boat) can't...
  19. Replies
    10
    Views
    1,218

    OK, so the fact he hasn't taught us the code for...

    OK, so the fact he hasn't taught us the code for changing uppercase to lowercase is acceptable?

    I'm a teacher myself and am aware of the difference between (a)teaching and (b)shouting from a...
  20. Replies
    10
    Views
    1,218

    I don't disagree. He's covered in a very basic...

    I don't disagree.

    He's covered in a very basic manner strings, input/output, getchar and for loops but he hasn't covered how to change strings from upper to lower case. Nor how to change strings...
  21. Replies
    10
    Views
    1,218

    Big Problems With Various Questions

    Hi,

    I'm COMPLETELY confused over my assignment for this week.

    We have ten questions.

    1. Change a user input string from lowercase to uppercase.

    2. Turn a user input string from string to...
  22. Replies
    14
    Views
    1,958

    That's 100% true. I am a language teacher, there...

    That's 100% true. I am a language teacher, there are millions of people who KNOW the languages I teach, far fewer who can teach them. (That doesn't mean that I believe I am a world class teacher,...
  23. Being fair, his program did work, I was modifying...

    Being fair, his program did work, I was modifying it slightly to store numbers into the array, but many/most of the problems you (and other posters) highlighted were his.

    Oddly that convinces me...
  24. Thanks. I'll work away at that for a while and...

    Thanks. I'll work away at that for a while and see where I get.

    Incidentally, does this mean my suspicions about my lecturer not exactly being the best are confirmed?

    I mean what you've all...
  25. Replies
    14
    Views
    1,958

    Described my feelings quite succinctly, except...

    Described my feelings quite succinctly, except that I have my doubts that my lecturer actually knows what he's doing himself. I have a feeling he's waffling from a book and doesn't actually know how...
Results 1 to 25 of 82
Page 1 of 4 1 2 3 4