C++ :: Write Program That Do The Algorithm Of Serial Divider?

Dec 25, 2013

Write program that do the algorithm of serial divider( You can divide to number in binary form and result also in binary.

View 2 Replies


ADVERTISEMENT

C :: Voltage Range - Write The Value On Serial Port

Mar 6, 2015

I have a Voltage Range from -10V up to +10V, which I transform to a voltage Range 0V to 5V, with the schematic i've attached, so I can use the A/D converter of my ATMEGA32 processor.

Now I'd like to write the value of the Input Voltage (which moves in the Range of -10V to + 10V) on the serial port, but i don't know how i should calculate this factor. At the moment, I can only write the value of the A/D Converter Input on the serial, but this is only 0V to 5V...

View 2 Replies View Related

C :: How To Read And Write A File Using Serial Port

Dec 29, 2013

Explain me a working code to read and write a file using serial communication.and i need to store that file.I know normal file handling in C, but how it is through serial port i am not getting.

View 1 Replies View Related

Visual C++ :: How To Read And Write On Serial Port With MFC

Feb 17, 2013

I want to read and write value on serail port to Microcontroller with MFC. The MFC have no serial port tool like in VB Professionnal edition. I try to find MFC connect serial port example but I not found. If you have good example for read and write on serial port with MFC

View 2 Replies View Related

C :: Write Algorithm Using Stack

Jul 22, 2014

write an algorithm using stack to determine if an input of string is in the form xCy where y is the reverse of x.x and y are strings of A and B. eg : AABACABAA

View 8 Replies View Related

C++ :: How To Write Algorithm / Design

Nov 16, 2013

How to write Algorithm / Design

View 7 Replies View Related

C++ :: Connect 4 Program With Minimax Algorithm?

Dec 27, 2013

this is connect 4 program with Minimax algorithm using NegaMax algorithm and I don't know actually if I implemented it correctly ..how to evaluate neutral moves check it out and tell me how to implement it better

#include <iostream>
#include <cstdlib>
#include <conio.h>

[Code].....

View 4 Replies View Related

C++ :: Program That Uses Negative Numbers In A Conjecture Algorithm

Mar 6, 2013

I have to write a program that uses negative numbers in a conjecture algorithm. The program terminates when a number is reached that was already outputted. I can not get it to work and I have been racking my brain for a week.

#include <iostream>
using namespace std;
int main() {
int x[1000], y[1000], i=0, j=0, count=0, w=0, z[1000], t = 0;

[code]....

View 2 Replies View Related

C/C++ :: Sorting Algorithm Program - Split Given String On Commas

Feb 21, 2014

I'm currently trying to code a sorting algorithm program.

let's asume I have a string given: aa, aaa, bbb, bas, zya!

I first of all want to split the given string on commas and '!' tells the program the string ends here and is no part of the last word. lower and upper case is not important at the moment. trying to implement everything with standard libary

output should be like that ofc:
aa
aaa
bas
bbb
zya

I already looked into the bubble sort algorithm and I think it benefits my needs. Just wanted to know how I should start out with the string split.

View 2 Replies View Related

C :: How To Get Program To Write Itself

Aug 27, 2013

For instance Code: int counter;
counter =0;
FILE *pfile;
pfile= fopen("g:myprog.txt" "w");
while (counter >100)
{ fprintf (case counter{something})}; how do I do this?

View 11 Replies View Related

C :: Write A Program That Would Open A PDF?

May 10, 2013

I have a batch of .pdf files (~1000) with names 001.pdf 002.pdf ...etc. Still pretty new to C, but would it be possible to write a program that would open a PDF, prompt a new name from user, and when entered, close the .pdf and open the next one in the list?

View 14 Replies View Related

C++ :: How To Write A Bootable Program

Apr 21, 2013

I want to write a bootable c/c++ Hello World. How can i do that?

View 2 Replies View Related

C++ :: Write A Program That Has 3 Subcategories?

Jul 14, 2013

So I am trying to write a program that has 3 subcategories under the category section. the subcategories are donuts, drinks and chips

struct Inv
{
double sku;
char category[SIZE];

[Code].....

I have to make the subsections here so the user can choose the category.

View 3 Replies View Related

C :: Write A Program To Copy One File To Another?

Feb 11, 2013

Here I was trying to write a program to copy one file to another.

Code:
#include <stdio.h>#include <stdlib.h>
int main(int argc, char *argv[])
{
FILE *fp , *ft;

[Code]....

So it should copy test1 to test2. Now I created test1 in gedit. I just put one character "c" in it and closed it. And I ran the program. When I check sizes of test1 and test2 , using

ls -l

command, I see that test2 has 4 bytes and test1 has 2 bytes. So something strange is happening here. I just put a single character in test1, so shouldn't it show 1 byte ? And why test2 is showing 4 bytes ? I have Win XP on my laptop. And I use Ubuntu 12 inside VirtualBox. So this is Linux environment...

View 10 Replies View Related

C :: How To Write A Program That Will Calculate Stress

Feb 7, 2013

I recently signed up for ES201 class and am confused with how to compile a program in the C language that will convert ACT scores to SAT scores.

View 5 Replies View Related

C :: Program To Write Even And Odd Integers Into Different Files

Sep 7, 2014

-Create three files namely all_numbers, odd_number and even_number.
-Get the number of records and the numbers to store from the user.
-Save all the numbers in "all_numbers" file.
-Read each number and check whether it is odd or even.
-Store the odd numbers in odd_number file and even numbers in even_number file.
-Finally, print the numbers stored in odd_number and even_number files.

The output of the program will look like this.

How many records that you want to store :41

2
3
4

The data are written too the respective files.

The even numbers are 2 4
The odd numbers are 1 3

View 9 Replies View Related

C :: How To Write A Program That Gives Few Default Values

Oct 11, 2014

I would like to write a program that gives you a few default values. Now you can keep these values by pressing the enter key or you can change them by just typing in new ones and confirm the new values by pressing the enter key again.

Thats as far as i got on my own but it doesn't really work. what i can do to fix this.

Code:

#include<stdio.h>
#include <conio.h>
int getInt(int min, int max);
int main () {
int a[3] = {3,4};
int b;
int code;

[Code]...

View 2 Replies View Related

C++ :: Write A Program That Tells The Day Of The Week?

Feb 7, 2015

I need to write a program that tells the day of the week, month, day, year, and whether it is a leap year or not from a input of MM DD YYYY form.

Example: Enter numeric values for month, day and year of a date> 10 31 1990 Wednesday, October 31, 1990 occurred in a non-leap year.

View 3 Replies View Related

C++ ::  Write A Program That Prints Out The Even Integers Between 2 And 100

Nov 4, 2013

#include <iostream>
using namespace std;
int main()
{
int num = 2;
int count = 0;
while (num <= 100)

[Code]...

The code works fine but I need the results to print out like

2 4 6 8 10 12 14 16 18 20
22 24 26 28 30 32 34 36 38 40

instead of

2
4
6
8
10
12

I don't know how to do this.

View 7 Replies View Related

C++ :: Write A Program That Asks The User For A Name

Jul 2, 2014

So I am trying to write a program that asks the user for a name. If the user enter the right name the program ends but if the user were to enter the wrong name the program would enter a loop prompting the user to re-enter the name. However I am not able to get the program to work!

View 9 Replies View Related

C++ :: Write A Program That Gives Current Calendar

Jan 14, 2014

I have a problem. I want to write a program that gives me the current calender for example like this:

June 2009

Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

and I shouldn't use windows.h

View 2 Replies View Related

C++ :: Write A Program That Find A Years Day?

Aug 12, 2014

Given that today is June 9, thursday, write a program that will print the day of the week on June 9, after x years from now. Assume one year is 365 days.

View 2 Replies View Related

C++ :: How To Write A Program To Calculate Pi To N Number Of Places

Aug 13, 2014

I assume floating point numbers in C++ have a default maximum of 5 decimal places. You can use setprecision() but is this limitless?

So how would find say write a program to calculate Pi to N number of places?

View 3 Replies View Related

C :: Write A Program Which Finds Difference Between Two Arrays

Mar 9, 2013

My tasks was to write a program which finds difference between two arrays (elements which are in first array but not in second and vice-versa). Program works, but something wrong is with the memory allocation for array.

My code is:
main.c Code: #include <stdio.h>
#include <stdlib.h>
#include "header.h"

[Code]....

View 5 Replies View Related

C :: Write A Program With Two Functions Both Called From Main

Mar 14, 2013

Write a program with two functions both called from main(). The first function just prints "Hello". In the second function ask the user to enter a number. Calculate the square root of the number and return the result to main(). In main() print the square root value.

Code:

#include<stdio.h>
#include<math.h>
float fun3 (float );
main()
}

[code]...

View 3 Replies View Related

C++ :: Write A Program That Reads Data From A File?

Feb 26, 2013

Write a program that reads data from a file (use the attached data file). These data are a student name and 3 test scores. The program should calculate the average of the 3 test scores, and display the name, 3 test scores, and the average to the monitor.

Useful tips:
a) Include the following header files: iostream, fstream, iomanip, and string
b) The name of the data file is “datafile.txt”, you need to save the file in the same folder of the source file.
c) use the manipulators (setw, setprecision, setfill, showpoint, fixed) to format the average with 1 digits after decimal point as following.
d) Use character ‘ ’ for tab.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved