473,396 Members | 2,052 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,396 software developers and data experts.

How to remove the excess zeros from table.

#include<stdio.h>
void multi(double);
int main(){
double n;
printf("Enter number");
scanf("%lf",&n);
multi(n);
}
void multi(double n){
int i;
for(i=1;i<=10;i++){
double k=(double)i;
printf("%lf*%d=%lf\n",n,i,i*n);
k=(int)i;
}}




output:
Enter number 1.2
1.200000*1=1.200000
1.200000*2=2.400000
1.200000*3=3.600000
1.200000*4=4.800000
1.200000*5=6.000000
1.200000*6=7.200000
1.200000*7=8.400000
1.200000*8=9.600000
1.200000*9=10.800000
1.200000*10=12.000000
Nov 29 '22 #1
1 12948
dev7060
636 Expert 512MB
How to remove the excess zeros from table.
%g format specifier could work.
Dec 9 '22 #2

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

Similar topics

2
by: Mike Solomon | last post by:
I have written a script that adds a row to a table and moves the values from the initial line into the new line What I am now trying to do is add a button in each new row that will allow me to...
1
by: PawelR | last post by:
Hello Group, I've problem with remove row in table. I've DataTable myTable and display row this table i DataGrid (myGrid). DataView myView = new DataView(); myView.Table=myTable;...
15
by: Bob | last post by:
I'm about to convert to string and use regex, but I thought there must be something I'm missing here that already exists. Bob
2
by: chris | last post by:
Hi, I have a simple ms access application that allows you to scan barcodes in to a form which stores them in the database. The barcodes are 6 digits in length e.g. 555666 but my handheld...
8
by: voroojak | last post by:
i want to remove space in my table. it is a text box and i want to remove the space after the character. the field is integer thanks aot
3
by: Mitramirsa | last post by:
I want to write a trigger so that rows deleted from the table are logically-deleted, rather than being actually removed. That is, such rows are marked as being deleted, rather than actually being...
8
natalie99
by: natalie99 | last post by:
hi everyone i have reseached this topic and cannot seem to find a solution that suits my problem, please help!! I have two tables, "Inventory" which contains 30,000 or so records, with about...
2
by: Smokey Grindel | last post by:
I basically need to remove any leading zeros and hyphens from a string... regex seemed like the best rout and using a replace regex method... anyone know of any good strings for this? The one I...
5
n8kindt
by: n8kindt | last post by:
First of all, i haven't been to this site in a while and WOW is it much improved. I love all the new stuff--it looks great! I am all but done building a simple Point of Sale system through...
0
by: SAWULA | last post by:
I am making a c# calculator, and I want group the digits and remove trailling zeros. whan I uesed this code NumberFormatInfo nFI = new CultureInfo("en-US",false).NumberFormat; Decimal...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.