C# :: Create Line Chart That Will Be Universal For Every Currency
Dec 30, 2014
I need to create a line chart that will be universal for every currency. As Y it will display value of currency, as X it will display time when that value was established.
For drawing I think of using Windows.UI.Xaml.Shapes.Line and Windows.UI.Xaml.Controls.Canvas
What I want to get is something like image below but it would have to draw correctly scaled chart for every currency which is the biggest problem(I think it is).
For every currency I will probably have to get minimal and maximal value which will be used to properly scale a chart(I will probably also have to get rendersize of canvas or something).
The user will choose the range of time and then the correct chart must be drawn (For example 04-11-2004 to 11-03-2007)
It is a windows store project.
View 4 Replies
ADVERTISEMENT
Mar 6, 2015
I am working in an assignment and part of this assignment is to input a CSV file with floats such as this:
8.5, 10.5, 90.5
49.5, 99 ,97
88, 70, 100
78, 2, 10
into an universal variable array.I just want to figure out a way to simply input the CSV file into a 2D variable array.The values in the array will be later use in functions that I'm trying to figure out but I can't do that until I store these values in the array. I think is just a matter of figuring out how to tell fscanf to ommit spaces and commas, but I don't know how. This is what I have done
Code:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
float grades[1001][101];
int main(int argc, char* argv[]){
[Code] ....
The output is this
Assignment 1 of student 1 = 8.5 Assignment 2 of student 1 = 10.5 Assignment 3 of student 1 = 0.0 Assignment 1 of student 2 = 90.5
I think I'm close to solve it but something is missing the output should look like this
Assignment 1 of student 1 = 8.5 Assignment 2 of student 1 = 10.5 Assignment 3 of student 1 = 90.5 Assignment 1 of student 2 = 49.5
View 1 Replies
View Related
Feb 7, 2012
I have a char *pch that points to an integer digit 1 or 2 or ... 9. To get the character that's 1 less, instead of converting to int, minus 1, then converting back to char, I tried (*pch -1) and that seemed to work. I suppose that's because the particular character encoding on my system is such that the digits are encoded in the same order and spacing as the integers they represent. So the question is does this "convenience" feature hold true for all character encoding systems?
View 10 Replies
View Related
Apr 30, 2013
How to convert string to currency type.
View 7 Replies
View Related
Nov 3, 2013
Code:
/*Currency Conv Control Module*/
#include <stdio.h>
#include "currencyconv.h" /* defines constants, declares functions */
int main(void) {
float us_dollars;
float currency;
int user_input;
[Code] ....
This is $$ converter program I created that is split up over 3 files. It takes the users input in US Dollars and converts it to the currency selected. When executing the program I am encountering a small problem. It actually isn't converting anything and returns 0.00 dollars.
I would like for it to convert the amount entered into the currency selected. I would also like to add in the print statement the type of currency the user has selected.
View 3 Replies
View Related
Jun 15, 2013
i have given a project for currency conversion program with add,delete,search,display option. but i was thinking if it can update the currency rate from internet at beginning.
View 3 Replies
View Related
Nov 14, 2013
How to make a program to enter password and if password right I can change the curency. I only want to change from ringgit malaysia to us dollar.The program can convert currency many times.I only want to use stdio.h
#include <stdio.h>
void main() {
int pass;
printf("Input your password");
scanf("%d",$pass);
if (pass==4782)
[Code] ....
After this what should I put to complete this program?
View 2 Replies
View Related
Jun 3, 2013
It's really simple to say to a pointer to point to a sigle character or a single number.
Code: int *ptr;
int a = 5;
cout << *ptr << endl;
But I want for example a pointer to change a whole text line. My idea is that the user enters which language he speaks.
Code: cout << "English" << endl;
cout << "Swedish" << endl;
But I don't know how to this. I could have done this without pointers with if statments but I want to do it with pointers because it were a exercise to do.
View 3 Replies
View Related
Apr 4, 2015
Im trying to do a small program that will create multiples of the previous line *2, and spit out the anwser in seperate lines (as many times as the user wants)
Example if i wrote it in a bad way
2
4
8
16
32
etc.
At this time my code looks likes this, now im planing to get my hands on the IF statment
using System;
using System.Collections.Generic;
using System.Linq;
[Code].....
View 6 Replies
View Related
Nov 26, 2013
I want to draw a 2D bar chart according to 10 or 15 numbers in c++. How can i do it? Which i need components?
View 1 Replies
View Related
Dec 17, 2012
I need to make a bar chart with asterisks that looks like this:
Store 1: ******
Store 2: ***
etc.
anyway, right now what I have is:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main () {
const int STORES = 5;
int sales[STORES], i;
for (i = 0; i < STORES; i++) {
[code].....
It's not displaying asterisks.
View 1 Replies
View Related
Jan 18, 2015
I'm just getting back into the swing of things after a long time of not programming. I'm trying to create a program which takes in command line arguments and prints the last one. My code is as follows:
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
string x;
vector<string> arguments;
[Code]...
And the error message I receive, a simple but frustrating one, is as follows:
Enter arguments, enter STOP to stop: Segmentation fault...
View 1 Replies
View Related
Jan 6, 2014
how to draw a flow chart for following nested loop?
for(int r=1;r<=5;r++){
for(int c=1;c<=r;++c){
cout<<c;
}
cout<<endl;
View 1 Replies
View Related
Dec 14, 2013
The only language I know so far is C. Is there any way I can use c programming to display a live chart for a price graph including volume in different time intervals that I want to select. I want it to look like this URL....
View 2 Replies
View Related
Nov 11, 2014
I have the following code. I have hardcoded the x and y values to test. And for some reason for the point (0,-0.5) it plots (1,-0.5) . What is going on, because if you try other values then the graph displays correctly.
foreach (var grp in q) {
point = new DataPoint();
Sum1 = grp.Sum1 > 2 ? 2 : grp.Sum1;
Sum1 = Sum1 < -2 ? -2 : Sum1;
[Code] ....
Attached is what is displayed.
Attached image(s)
View 13 Replies
View Related
Nov 27, 2014
I am Trying all the Time to implement in c# moving of points by using Mouse ( Web Applications) and save the new value in array. But not successful ...
View 3 Replies
View Related
Mar 7, 2014
How can a mulitline string be read line by line
ex: str = "PERIOD="week"
DAY="day"
TIME="time"";
View 2 Replies
View Related
Mar 10, 2015
This is a round robin execution. with gantt chart. arrival time and burst time. I think there is an error in my formula to get the right answer,i cant resolve it but my program is running. What is the code or the right formula??
#include<stdio.h>
int main(){
int i,j=0,n,time,remain,flag=0,ts;
int sum_wait=0,sum_turnaround=0,at[10],bt[10],rt[10];
int ganttP[50],ganttStartTime[50];
printf("Enter no of Processes : ");
scanf("%d",&n);
remain=n;
[Code] ....
View 2 Replies
View Related
Mar 5, 2013
I need to write a ANSI program to print out each command line argument on a separate line using a for-loop. also it need to print the name of the executable .so far I have
Code:
#include <stdio.h>
int main(int argc, char **argv) {
int i;
printf("")
[code]....
View 1 Replies
View Related
May 7, 2013
l need to write a program which writes out its command line arguments in reverse order one per line. The output from the program should look like this:
% a.out Two roads diverged in a yellow wood
wood
yellow
a
in
diverged
roads
Two
View 9 Replies
View Related
Aug 17, 2014
I am trying to read a file line by line and then do something with the informations, so my method looks like this:
Code:
void open_file(char *link) {
FILE *file = fopen(link, "r");
if (file == NULL) {
fprintf(stderr, "Could not open file.
");
exit(EXIT_FAILURE);
[Code] ....
1) The first complain of valgrind is at the line where I use fgets and its telling me (invalid write of size x), but I have allocated my line to 56000 and the read line is shorter, why is there a write size error then :S?
2) at the line where I realloc where I try to shrink the space he's telling me: Address .... is 0 bytes inside a block of size 56000, But I know i need only this space so why is there a write over space error :S??
View 9 Replies
View Related
Sep 25, 2013
So I'm reading a file line by line and storing it backwards into a list. So if the file has has this format...
1
2
3
4
The code should store each line in a list as such...
4, 3, 2 ,1
Instead the code will store the last variable in all nodes. So the final list will look like this...
4, 4, 4, 4
Here is my code...
struct node *head = NULL;
int i;
while(read(in, &i, sizeof(int)) != 0) {
struct node *temp = malloc(sizeof(*temp));
temp->line = &i;
temp->next = head;
head = temp;
}
View 4 Replies
View Related
Jul 15, 2013
I need to read lines from one file and copy them line by line into another file using dynamic memory allocation. It compiles but gives me a seg fault. Why/How?
Code:
int main(){
FILE *fp1;
FILE *fp2;
FILE *i;
fp1=fopen("file1","r");
fp2=fopen("file3","w+");
[Code] ....
View 2 Replies
View Related
Feb 11, 2014
There are numbers of lines connected to each other. I've extracted the line start point and end points but i am confused how to compare the end point of one line with the start point of adjoining line.
View 2 Replies
View Related
Feb 3, 2014
I was loaded a bmp file in my mfc window and stored rgb data in a file.My image size is 320x240.
Is possible to pick a single point (location) from that bmp image (Not the whole window)?
i like to plot a line graph using the pointed single line data using the stored file data?
here R is X Axis and G & B is Y Axis.
If i have 2D array of data means how can i plot the line graph?
View 4 Replies
View Related
Nov 5, 2014
I'm using fgets which will read a single line at a time, but unlike fgets I don't want it to return the new line char ( ) ?I want to be able to use printf to display the lines next to each other.
View 7 Replies
View Related