㈠ 電話號碼的編寫規則是什麼
電話號碼由10個阿拉伯數字(0~9)構成,這10個數字排列使用具有嚴格的規律性,全國統一編排,任何地區或單位都不得隨便改動。
㈡ 用java編寫輸出一個手機號碼
//手機類
classPhone{
privateStringbrand;//品牌
privateStringtype;//型號
//重寫構造函數
publicPhone(Stringb,Stringt){
this.brand=b;
this.type=t;
}
//顯示手機信息
publicvoidshow(){
System.out.println("手機品牌為:"+this.brand+"手機型號為:"+this.type);
}
}
//測試類
publicclassTest{
publicstaticvoidmain(String[]args){
Phonep=newPhone("NOKIA","5230");//初始化手機信息
p.show();
}
}
運行結果:
手機品牌為:NOKIA手機型號為:5230
㈢ c語言編譯一個電話號碼,輸出後四位
#include<stdio.h>
#include<string.h>
intmain(void)
{
chartel[50];
printf("InputTel: ");
scanf("%s",tel);
if(strlen(tel)>4)
{
printf("%s ",tel+strlen(tel)-4);
}
else
{
printf("TelLengthFailed! ");
}
return0;
}
㈣ word文檔中如何編輯手機號碼
將word中需要轉化成excel格式的電話號碼選定,復制,然後粘帖到excel中(這些電話號碼粘帖到excel中後呈一列顯示),在excel中點數據——分列,根據需要選擇文件類型,一般選擇分隔符號,點下一步,你在word中用什麼作的分隔符就在分隔符號的下面選擇什麼,比如用空格作的分隔符,就選空格,然後點下一步,選擇文本,再點完成,即可看到電話號碼與在word中的行列一致。
㈤ 簡單個人電話號碼管理系統用C語言編譯
打醬油的!
㈥ C語言編寫一個隨機生成電話號碼且按大小排序的程序
rand()函數應該知道吧,一般的排序演算法:選擇,冒泡什麼的演算法。回了就可以寫了。先用
先定義一個數組,然後用rand()函數生成隨機數給數組的每個元素賦值,然後排序。。。這樣就完成了。。。希望樓主能夠堅持,自己做出來的才是最有成就感的,可能實現的時候邏輯還是不清晰,代碼也不是很漂亮,這都是一個必須經歷的過程。我當初學語言的時候,也有過花幾天寫一個很簡單的程序。。。由此喜歡編程。。。。不羅嗦了,樓主整理思路,繼續調試吧。
㈦ 用java編譯列印隨機產生的電話號碼,其形式為XXX-XXX-XXXX 前三個數字中不應有8和9,中間的值不應大於742。
package test;
import java.text.DecimalFormat;
public class Test {
public static void main(String args[]) {
String result = "";
for(int i = 1;i <= 3;i++){//前3個,隨即數1-7
result = result + Integer.toString((int)(Math.random() * 8));
}
DecimalFormat a = new DecimalFormat("0000000");//隨機到非7位數時前面加0
result = result + a.format((int)(Math.random() * 4720001));//隨機數0-4720000
System.out.println(result);
}
}
㈧ 編寫一個電話簿程序(C++來實現)
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
class Tep
{
public:
friend istream& operator>>(istream &,Tep &);//輸入電話本
friend ostream& operator<<(ostream &,Tep &);//輸出電話本
private:
string str[1][2];//姓名,電話
};
istream& operator>>(istream &input,Tep &t)//重載輸入
{
cout<<"請輸入姓名:"<<endl;
input>>t.str[0][0];
cout<<"請輸入電話:"<<endl;
input>>t.str[0][1];
return input;
}
ostream& operator<<(ostream &output,Tep &t)//重載輸出
{
output<<"name:"<<t.str[0][0]<<setw(5)<<"tel:"<<t.str[0][1];
return output;
}
int main()
{
Tep t;
cin>>t;
cout<<t;
return 0;
}
㈨ 用C++寫一個簡單個人電話號碼查詢系統 寫出來能編譯的滿分
#include<iostream.h>
using namespace std;
int main()
{
cout<<"HELLO"<<endl;
return 0;
}
㈩ 如何編輯電話號碼
請您打開需要編輯的聯系人號碼-點擊右上角的筆圖標-然後可以編輯聯系人姓名或更換號碼-更改後點擊存儲