16 Topics
|
|
The output comes out wrong it should be different: //This is what I have Enter a sentence: Today Is Thr Jan, 2015 Number of uppercase letters.........2 Number of digits....................2 Number of vowels....................2 Press any key to continue . . . //The output should look like this: Enter a sentence: Today … |
|
So I'm trying to count the number of occurrences of each digit within an array. My code I've got so far looks like the following: #include <stdio.h> #include <string.h> int main() { int numbers [10]= {1, 4, 5, 5, 5, 6, 6, 3, 2, 1}; int count = 0; for(int … |
|
I need help with my homework assignment. The assignment is write a method DisplayDigits that receives an integer between 1 and 99999 and displays it as a sequence of digits, separating each pair of digits by two spaces. For example, 4562 should appear as 4 5 6 2 I have … |
|
I wish to store an integer wid a 1000 digits for a program in C++.Please suggest me a datatype i should use.I'm using a 64 bit computer but the dev c++ i'm using is 32 bit. |
|
i want seprate 1234 like 1,2,3,4 when i give 1234 then this code works fine but if i give long int like 34545666 this code does not work. int main() { clrscr(); int num,r,c,sp,x; printf("enter number"); scanf("%d",&num); while(num!=0) { x=num%10; printf("%d",x); num=num/10; } |
|
I'm causing input letters to write ones into variables through an array. I'm trying to count the occurences of ones in a variable. Lets say I input aaaaa. The count output displays 12345. Instead of outputting the whole count of numbers, I want to output the biggest number in the … |
|
hello everyone I really need help so I have to make functions that find vowels, digits and uppercase and lowercase letters from a sentence inputted. So i was able to do it all in main but i cant seem to make the new program work with the functions properly, it … |
|
How to return the sum of the last digits of the values in a list? i cant think of an efficient way. If it wasn't for being in a list i could do it, but im really lost. Can anyone advise me? im going to look for a way in … |
|
Ok ,I've solved it! |
|
I need help with a lab I'm doing. In this lab you have to show the number of odd digits a number has, for example the number 4135 would have three odd digits. I've already done a lab where it tells you if a number is odd or even but … |
|
Hi, I am trying to write a program that will separate the digits of a non-negative integer and will print them each two spaces a apart but I have to avoid using arrays. For example if input is: 12345 then output should be: 1 2 3 4 5 I have … |
|
hi, I already know how to use setprecision but the function wont let the round go up past 16. [CODE]#include<iostream> #include<stdio.h> #include<math.h> #include<iomanip> using namespace std; int main () { double pi = 3.14159265358979323846264338327950288419716939937510; cout << setprecision(50) << pi << endl; system("pause"); } [/CODE] the output is just 3.1415926535897931 the … |
|
Hello, I have a problem with the atan2 function. I have 2 programs, one in C and one in Matlab. Both have an identical implementation. My problem is that I am getting occasionally different values from the atan2 function in C and Matlab. For instance: x=0.29695007709080329 y= -0.96764419257510348 Matlab atan2= … |
|
Hey everyone, I am having difficulty parsing digits in java. By that I mean that I am trying to make a program print out the number of bills the user recieves when he/she recieves change after there payment, (Cash register). Here is the code i've created to do this for … |
|
Hi , I've written following program that takes a four digits integer from user and shows the digits on the screen separately i.e. if user enters 7531, it displays 7,5,3,1 .Any one can tell me how it can be written better and how to display digit in linear order i.e. … |
|
It counts upper lower and digits in a file .. |
The End.