473,326 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

solve the problem and get the points,

Write a program using malloc function. In which you take input from user and allocate memory equal to square of this number. Which multiply numbers and draw a table in the following format?

Hint: User enters 3 then program allocates equal to 9 integer memories.

Output:1

Enter a single digit number:
2
The multiplication table of 2 is:
1 2
----------------
1| 1 2
2| 2 4

Output:2

Enter a single digit number:
4
The multiplication table of 4 is:
1 2 3 4
--------------------------------
1| 1 2 3 4
2| 2 4 6 8
3| 3 6 9 12
4| 4 8 12 16
Jun 6 '07 #1
1 1269
ilikepython
844 Expert 512MB
Write a program using malloc function. In which you take input from user and allocate memory equal to square of this number. Which multiply numbers and draw a table in the following format?

Hint: User enters 3 then program allocates equal to 9 integer memories.

Output:1

Enter a single digit number:
2
The multiplication table of 2 is:
1 2
----------------
1| 1 2
2| 2 4

Output:2

Enter a single digit number:
4
The multiplication table of 4 is:
1 2 3 4
--------------------------------
1| 1 2 3 4
2| 2 4 6 8
3| 3 6 9 12
4| 4 8 12 16
Ok, here we don't give out code or answers. Attempt it yourself first, then post if you have any problems. There has been several threads about this problem already.
Jun 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Billy Patton | last post by:
I have a polygon loaded into a vector. I need to remove redundant points. Here is an example line segment that shows redundant points a---------b--------c--------d Both b and c are not...
16
by: Fahad | last post by:
I am a newcommer in c world, I am making a tiny program on Mathematics. I have one problem if somebody enter his name, "i am able to make the first letter uppercase but my problem how can i make...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
1
by: a4w | last post by:
I am not sure if this is too-granular a question to post to this group; however, I did not see a Tablet-specific group. I am experiencing a problem with the Microsoft.Ink.Ink.HitTest(Point , float)...
0
by: muggy440 | last post by:
Hello; The code below is one of solving the closest pair problem but some parts missing can any one help me out. #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h>
10
by: perochak | last post by:
Write a C++ program to calculate the GPA of students. Your program should contain a class named Gpa. The class should have an array named result, as its data member. This array is meant to take...
5
by: tom | last post by:
Hi! I ran in problem with simple exercise. I'm trying to get program to return grade when given points but no matter what, I always get F. def grader(): print "Insert points: " points =...
5
by: saytri | last post by:
I've got a problem in sorting. I have to use a bubble sort to sort the scores with those who bring the highest percent at the top. The scores of each user i saved in a text file. This is how i...
1
by: sternchen | last post by:
Hi, I read all threads to this topic which were exactly like my problem and I tried all solutions but it still doesnt want to work :(. Can anybody help? I wrote an application where you can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.